Merge pull request #14 from chhemme/patch-1
Ignore authentication requests with empty username
This commit is contained in:
@@ -69,6 +69,12 @@ class LoginLDAPPlugin extends Plugin
|
|||||||
public function userLoginAuthenticate(UserLoginEvent $event)
|
public function userLoginAuthenticate(UserLoginEvent $event)
|
||||||
{
|
{
|
||||||
$credentials = $event->getCredentials();
|
$credentials = $event->getCredentials();
|
||||||
|
|
||||||
|
// empty username -> ignore
|
||||||
|
if($credentials['username'] == ''){
|
||||||
|
$event->setStatus($event::AUTHENTICATION_FAILURE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Get Proper username
|
// Get Proper username
|
||||||
$user_dn = $this->config->get('plugins.login-ldap.user_dn');
|
$user_dn = $this->config->get('plugins.login-ldap.user_dn');
|
||||||
|
|||||||
Reference in New Issue
Block a user