ldap-connector icon indicating copy to clipboard operation
ldap-connector copied to clipboard

ErrorException when user not found

Open settiermauro opened this issue 8 years ago • 0 comments

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.

settiermauro avatar Oct 11 '16 21:10 settiermauro