Merge pull request #27 from ViliusS/stop-propagation
Stop event propagation on empty username
This commit is contained in:
@@ -70,10 +70,11 @@ class LoginLDAPPlugin extends Plugin
|
||||
public function userLoginAuthenticate(UserLoginEvent $event)
|
||||
{
|
||||
$credentials = $event->getCredentials();
|
||||
|
||||
// empty username -> ignore
|
||||
|
||||
// Fail early on empty username
|
||||
if($credentials['username'] == ''){
|
||||
$event->setStatus($event::AUTHENTICATION_FAILURE);
|
||||
$event->stopPropagation();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user