Merge pull request #35 from Linegod/patch-1
Fix issue #28 - Grav username defaults to the LDAP users full DN
This commit is contained in:
@@ -131,7 +131,7 @@ class LoginLDAPPlugin extends Plugin
|
||||
$ldap->bind($username, $credentials['password']);
|
||||
|
||||
// Create Grav User
|
||||
$grav_user = User::load(strtolower($username));
|
||||
$grav_user = User::load(strtolower($credentials['username']));
|
||||
|
||||
// Set defaults with only thing we know... username provided
|
||||
$grav_user['login'] = $credentials['username'];
|
||||
@@ -258,7 +258,7 @@ class LoginLDAPPlugin extends Plugin
|
||||
$this->grav['log']->error('plugin.login-ldap: ['. $e->getCode() . '] ' . $username . ' - ' . $message);
|
||||
|
||||
// Just return so other authenticators can take a shot...
|
||||
if ($message = "Invalid credentials") {
|
||||
if ($message == "Invalid credentials") {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user