Add new config option to disable automatic creation of LDAP accounts
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user