ldap-connector
ldap-connector copied to clipboard
ErrorException when user not found
Exception when founding no ldap user on Dsdevbe\LdapConnector\Adapter\Adldap.php:59
public function getUserInfo($username, $password = null)
{
$user = $this->_ldap->search()->where('samaccountname', '=', $username)->first();
return $this->mapDataToUserModel($user, $password);
}
When the query result has no users the method 'first()' returns false and an exception is raised because the method 'mapDataToUserModel' expects an 'adLDAPUserModel' for the parameter 1 and a bool var is given instead.