code: public function retrieveByCredentials(array $credentials)
      {
          $username = $credentials['username'];
          $result = $this->ldap->find($username);
  
          if( !is_null($result) ){
              $user = new $this->model;
              $user->build( $result );
  
              return $user;
          }
  
          return null;
      }
docs: Retrieve a user by the given credentials.
  
  @param  array $credentials
  @return \Krenor\LdapAuth\Objects\LdapUser|null