Skip to content

Commit

Permalink
Merge pull request #8 from WindSaber/master
Browse files Browse the repository at this point in the history
Retrieving user information Pull request #4
  • Loading branch information
Sascha Dens committed Feb 22, 2015
2 parents 8965771 + c6d88ac commit 6e0dfcf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Dsdevbe/LdapConnector/LdapUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 6e0dfcf

Please sign in to comment.