app/app/Services/Ldap/LdapAuthUserProvider.php
/**
     * Retrieve a user by their unique idenetifier.
     *
     * @param  mixed  $identifier
     * @return Illuminate\Auth\GenericUser|null
     */
Retrieve a user by their unique idenetifier.
@param  mixed  $identifier
@return Illuminate\Auth\GenericUser|null
Retrieve a user by their unique idenetifier . @param mixed $identifier @return Illuminate \ Auth \ GenericUser|null
public function retrieveByID($identifier)
    {
        $ldapUserInfo = null;
        $userNameField = $this->getUsernameField();
        if ($this->model) {
            $model = $this->createModel()->newQuery()->find($identifier);
        }
        if (isset($model)) {
            $username = $model->$userNameField;
        } else {
            $username = $identifier;
        }
        $infoCollection = $this->ad->user()->infoCollection($username, array('*') );
        if ( $infoCollection ) {
            $ldapUserInfo = $this->setInfoArray($infoCollection);
            if ($this->model) {
                if ( ! is_null($model) ) {
                    return $this->addLdapToModel($model, $ldapUserInfo);
                }
            }
            return new LdapUser((array) $ldapUserInfo);
        }
    }
public function retrieveByID ( $ identifier ) { $ ldapUserInfo = null ; $ userNameField = $ this -> getUsernameField ( ) ; if ( $ this -> model ) { $ model = $ this -> createModel ( ) -> newQuery ( ) -> find ( $ identifier ) ; } if ( isset ( $ model ) ) { $ username = $ model -> $ userNameField ; } else { $ username = $ identifier ; } $ infoCollection = $ this -> ad -> user ( ) -> infoCollection ( $ username , array ( '*' ) ) ; if ( $ infoCollection ) { $ ldapUserInfo = $ this -> setInfoArray ( $ infoCollection ) ; if ( $ this -> model ) { if ( ! is_null ( $ model ) ) { return $ this -> addLdapToModel ( $ model , $ ldapUserInfo ) ; } } return new LdapUser ( ( array ) $ ldapUserInfo ) ; } }
Retrieve a user by their unique idenetifier.
Retrieve a user by their unique idenetifier .