Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrorException when user not found #42

Open
settiermauro opened this issue Oct 11, 2016 · 0 comments
Open

ErrorException when user not found #42

settiermauro opened this issue Oct 11, 2016 · 0 comments

Comments

@settiermauro
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant