Improve default email domain for reverse-prxy auth
This commit is contained in:
@@ -107,6 +107,7 @@ Original author: [Frédéric Guillot](http://fredericguillot.com/)
|
|||||||
Contributors:
|
Contributors:
|
||||||
|
|
||||||
- Alex Butum: https://github.com/dZkF9RWJT6wN8ux
|
- Alex Butum: https://github.com/dZkF9RWJT6wN8ux
|
||||||
|
- Ashish Kulkarni: https://github.com/ashkulz
|
||||||
- Claudio Lobo
|
- Claudio Lobo
|
||||||
- Cmer: https://github.com/chncsu
|
- Cmer: https://github.com/chncsu
|
||||||
- Floaltvater: https://github.com/floaltvater
|
- Floaltvater: https://github.com/floaltvater
|
||||||
|
|||||||
@@ -64,8 +64,9 @@ class ReverseProxy extends Base
|
|||||||
private function createUser($login)
|
private function createUser($login)
|
||||||
{
|
{
|
||||||
$email = strpos($login, '@') !== false ? $login : '';
|
$email = strpos($login, '@') !== false ? $login : '';
|
||||||
|
|
||||||
if (REVERSE_PROXY_DEFAULT_DOMAIN !== '' && empty($email)) {
|
if (REVERSE_PROXY_DEFAULT_DOMAIN !== '' && empty($email)) {
|
||||||
$email = $login . '@' . REVERSE_PROXY_DEFAULT_DOMAIN;
|
$email = $login.'@'.REVERSE_PROXY_DEFAULT_DOMAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->user->create(array(
|
return $this->user->create(array(
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ defined('GITHUB_CLIENT_SECRET') or define('GITHUB_CLIENT_SECRET', '');
|
|||||||
defined('REVERSE_PROXY_AUTH') or define('REVERSE_PROXY_AUTH', false);
|
defined('REVERSE_PROXY_AUTH') or define('REVERSE_PROXY_AUTH', false);
|
||||||
defined('REVERSE_PROXY_USER_HEADER') or define('REVERSE_PROXY_USER_HEADER', 'REMOTE_USER');
|
defined('REVERSE_PROXY_USER_HEADER') or define('REVERSE_PROXY_USER_HEADER', 'REMOTE_USER');
|
||||||
defined('REVERSE_PROXY_DEFAULT_ADMIN') or define('REVERSE_PROXY_DEFAULT_ADMIN', '');
|
defined('REVERSE_PROXY_DEFAULT_ADMIN') or define('REVERSE_PROXY_DEFAULT_ADMIN', '');
|
||||||
|
defined('REVERSE_PROXY_DEFAULT_DOMAIN') or define('REVERSE_PROXY_DEFAULT_DOMAIN', '');
|
||||||
|
|
||||||
// Mail configuration
|
// Mail configuration
|
||||||
defined('MAIL_FROM') or define('MAIL_FROM', 'notifications@kanboard.net');
|
defined('MAIL_FROM') or define('MAIL_FROM', 'notifications@kanboard.net');
|
||||||
|
|||||||
Reference in New Issue
Block a user