Fetch the user for the given user identifier from the data store

@param string $identifier A unique user identifier, (i.e a username or email address)
@param bool   $lazyload  Lazyload the $identifier(s) on the following call to getUser()
@return boolean
191824
public function fetch($identifier, $lazyload = false)
    {
        $identifiers = array_merge((array) $identifier, $this->_fetch);

        //Only fetch identifiers that haven't been loaded yet.
        foreach($identifiers as $key => $value)
        {
            if($this->isLoaded($value)) {
                unset($identifiers[$key]);
            }
        }

        if(!empty($identifiers))
        {
            if (!$lazyload)
            {
                if (!is_numeric($identifiers[0])) {
                    $users = $this->getModel()->email($identifiers)->fetch();
                } else {
                    $users = $this->getModel()->id($identifiers)->fetch();
                }

                if(count($users))
                {
                    foreach($users as $user) {
                        $this->setUser($user);
                    }

                    return true;
                }
            }
            else $this->_fetch = $identifiers;
        }

        return false;
    }
94644
public function retrieveById($identifier)
    {
        $model = $this->createModel();

        return $this->newModelQuery($model)
                    ->where($model->getAuthIdentifierName(), $identifier)
                    ->first();
    }
841247
public function retrieveByToken($identifier, $token)
    {
        $user = $this->conn->table($this->table)
            ->where('id', $identifier)
            ->where('remember_token', $token)
            ->first();

        if (! is_null($user)) {
            return new GenericUser((array) $user);
        }
    }
813589
public function getClient($identifier)
    {
        $client = $this->getClientFromPool($identifier);

        if ($client === null) {
            $client = $this->createClient($identifier);
            $this->getSession()->registerClient($client);
        }

        return $client;
    }
806841
public function get($identifier)
    {
        $identifier = (string) $identifier;

        if($this->offsetExists($identifier)) {
            $result = $this->offsetGet($identifier);
        } else {
            $result = null;
        }

        return $result;
    }
331783
public function get($identifier)
    {
        if ($this->themeLoaded === false) {
            $this->loadThemes();
        }

        return $this->themeList->get($identifier);
    }
901676
public function get($identifier = null)
    {
        $result = null;

        if (null === $identifier) {
            $result = self::$lookup;
        } elseif ('doozr.registry' === $identifier) {
            $result = $this;
        } else {
            if (true === isset(self::$lookup[$identifier])) {
                $result = self::$references[self::$lookup[$identifier]];
            }
        }

        return $result;
    }
427081
public function isLoaded($identifier)
    {
        if (!is_numeric($identifier)) {
            $result = isset($this->_emails[$identifier]);
        } else {
            $result = parent::isLoaded($identifier);
        }

        return $result;
    }
372505
protected function loadProfile($identifier = null)
    {
        if (!$identifier) {
            $identifier = 'generic';
        }

        if (isset($this->profiles[$identifier])) {
            $this->currentProfile = $this->profiles[$identifier];
        } else {
            $this->currentProfile        = new SgProfile();
            $this->profiles[$identifier] = $this->currentProfile;
        }

        return $this->currentProfile;
    }
309012
function fetchAttributeByIdentifier( $identifier, $asObject = true )
    {
        $attributeArray = eZContentClassAttribute::fetchFilteredList( array( 'contentclass_id' => $this->ID,
                                                                             'version' => $this->Version,
                                                                             'identifier' => $identifier ), $asObject );
        if ( count( $attributeArray ) > 0 )
        {
            return $attributeArray[0];
        }
        return null;
    }
906177
public function isLoaded($identifier)
    {
        $user = $this->getObject('user');

        // Find the user id
        if (!is_numeric($identifier))
        {
            if(!$identifier = JUserHelper::getUserId($identifier)) {
                $identifier = 0;
            }
        }

        if($identifier == 0 || $user->getId() != $identifier) {
            $result = isset($this->_users[$identifier]);
        } else {
            $result = true;
        }

        return $result;
    }
1333016
private function getUserId()
    {
        if (!$this->tokenProvider || null === ($token = $this->tokenProvider->getToken())) {
            return;
        }

        if (!$token->getUser() instanceof UserInterface) {
            return;
        }

        return $token->getUser()->getId();
    }
177875
public function findByAuth($provider, $identifier) {
        $user = null;

        $login = $this->repository->findByAuth($provider, $identifier);

        if($login !== null)
            $user = $login->getUser();

        return $user;
    }
1252745
public function getSingle($identifier, $default = null)
    {
        $get = $this->get($identifier, $default);
        if (is_array($get)) {
            return array_values($this->identifiers[$identifier])[0];
        }

        return $get;
    }
230119
public function getByIdentifier($identifier)
    {
        switch (APP_NATIVE_LOGIN_USING) {

            case 'EMAIL':
                $user = $this->getByEmail($identifier);
                break;

            case 'USERNAME':
                $user = $this->getByUsername($identifier);
                break;

            default:
                Factory::helper('email');
                if (valid_email($identifier)) {
                    $user = $this->getByEmail($identifier);
                } else {
                    $user = $this->getByUsername($identifier);
                }
                break;
        }

        return $user;
    }
884278
public function retrieveById($identifier)
    {
        $user = $this->conn->table($this->table)->find($identifier);

        return $this->getGenericUser($user);
    }
53276
public function get($identifier = null, $fallback = null) {
		return $this->arrayGet($this->_data, $identifier, $fallback);
	}