diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-07-18 10:17:18 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-07-18 10:17:18 -0400 |
commit | de109aaeafde6a375441970bcb40136cdb7dff45 (patch) | |
tree | 67219f7c1688191d0a6645abf3fda6d9abb6cb85 /app | |
parent | 5369c74ec0df35aa072a6067837c1d748836b96e (diff) |
Add new config option to disable automatic creation of LDAP accounts
Diffstat (limited to 'app')
-rw-r--r-- | app/Auth/Ldap.php | 2 | ||||
-rw-r--r-- | app/constants.php | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/app/Auth/Ldap.php b/app/Auth/Ldap.php index 3ee6ec9b..c1459b4e 100644 --- a/app/Auth/Ldap.php +++ b/app/Auth/Ldap.php @@ -46,7 +46,7 @@ class Ldap extends Base else { // We create automatically a new user - if ($this->createUser($username, $result['name'], $result['email'])) { + if (LDAP_ACCOUNT_CREATION && $this->createUser($username, $result['name'], $result['email'])) { $user = $this->user->getByUsername($username); } else { diff --git a/app/constants.php b/app/constants.php index 7270db23..83fba468 100644 --- a/app/constants.php +++ b/app/constants.php @@ -35,6 +35,7 @@ defined('LDAP_ACCOUNT_FULLNAME') or define('LDAP_ACCOUNT_FULLNAME', 'displayname defined('LDAP_ACCOUNT_EMAIL') or define('LDAP_ACCOUNT_EMAIL', 'mail'); defined('LDAP_ACCOUNT_ID') or define('LDAP_ACCOUNT_ID', ''); defined('LDAP_USERNAME_CASE_SENSITIVE') or define('LDAP_USERNAME_CASE_SENSITIVE', false); +defined('LDAP_ACCOUNT_CREATION') or define('LDAP_ACCOUNT_CREATION', true); // Google authentication defined('GOOGLE_AUTH') or define('GOOGLE_AUTH', false); |