diff --git a/src/Dsdevbe/LdapConnector/LdapUserProvider.php b/src/Dsdevbe/LdapConnector/LdapUserProvider.php index a0b0254..1a4f46d 100755 --- a/src/Dsdevbe/LdapConnector/LdapUserProvider.php +++ b/src/Dsdevbe/LdapConnector/LdapUserProvider.php @@ -79,8 +79,12 @@ public function updateRememberToken(Authenticatable $user, $token) */ public function retrieveByCredentials(array $credentials) { - if($this->adldap->user()->info($credentials['username'])) + if($userInfo = $this->adldap->user()->info($credentials['username'])) { + $userInfo = $userInfo[0]; + foreach($userInfo as $u=>$a){ + $credentials[$u]=$a[0]; + } return new LdapUser($credentials); } }