From 7fb7455814090c3a4cf13fc502511257cf046535 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Wed, 20 Aug 2014 10:44:00 -0700 Subject: Improve default email domain for reverse-prxy auth --- app/Auth/ReverseProxy.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/Auth') diff --git a/app/Auth/ReverseProxy.php b/app/Auth/ReverseProxy.php index 361e9634..6880f5fa 100644 --- a/app/Auth/ReverseProxy.php +++ b/app/Auth/ReverseProxy.php @@ -64,8 +64,9 @@ class ReverseProxy extends Base private function createUser($login) { $email = strpos($login, '@') !== false ? $login : ''; + if (REVERSE_PROXY_DEFAULT_DOMAIN !== '' && empty($email)) { - $email = $login . '@' . REVERSE_PROXY_DEFAULT_DOMAIN; + $email = $login.'@'.REVERSE_PROXY_DEFAULT_DOMAIN; } return $this->user->create(array( -- cgit v1.2.3