Retrieve a user by their unique identifier.

@param  mixed  $identifier
@return \Illuminate\Contracts\Auth\Authenticatable|null
320806
public function retrieveById($identifier)
    {
        $userService = app()->make(UserService::class);
        $user = $userService->byId($identifier)->get();

        if (! $user) {
            return null;
        }

        return $user;
    }
916743
public function getEntityByIdentifier($identifier)
    {
        $found_entities = $this->filter(
            function (EntityInterface $entity) use ($identifier) {
                return $entity->getIdentifier() === $identifier;
            }
        );

        return $found_entities->getFirst();
    }
759061
protected function _fetchExisting($identifier) {
        $this->_validateLoadable();
        $snippetModel = new Model_Snippet();
        $select = $snippetModel->select()
            ->where('identifier = ?', $identifier);
        $row = $snippetModel->fetchRow($select);
        return $row;
    }
273623
protected function getOneByIdentifier($identifier)
	{
		return $this->aggregate[IdentifierServiceProvider::getProviderKey()]->get([['field' => 'id', 'value' =>  $identifier->getEntityKey(), 'operator' => '=', 'or' => false]]);
	}
794186
public function get($identifier, $default = null)
    {
       $result = $this->offsetGet($identifier);

        // If the value is null return the default
        if(is_null($result)) {
            $result = $default;
        }

        return $result;
    }
146156
private function findUser($identifier)
    {
        try {
            $user = $this->getUserRepository()->findUserByIdentifier($identifier);
        } catch (NoResultException $exc) {
            throw new EntityNotFoundException($this->getUserRepository()->getClassName(), $identifier);
        }

        if (!$this->hasSystem($user)) {
            throw new UserNotInSystemException($this->getSystem(), $identifier);
        }

        return $user;
    }
708209
public function getDefinitionByIdentifier($identifier)
    {
        foreach($this->groups as $group) {
            foreach($group->getDefinitions() as $definition) {
                if ($definition->getIdentifier() === $identifier) {
                    return $definition;
                }
            }
        }
        return null;
    }
230200
public function getNodeByIdentifier($identifier)
    {
        $node = $this->firstLevelNodeCache->getByIdentifier($identifier);
        if ($node !== false) {
            return $node;
        }
        $nodeData = $this->nodeDataRepository->findOneByIdentifier($identifier, $this->getWorkspace(), $this->dimensions, $this->removedContentShown);
        if ($nodeData !== null) {
            $node = $this->nodeFactory->createFromNodeData($nodeData, $this);
        } else {
            $node = null;
        }
        $this->firstLevelNodeCache->setByIdentifier($identifier, $node);
        return $node;
    }
613413
public function getRouteByIdentifier(int $identifier)
    {
        return isset($this->routes[$identifier])
            ? $this->routes[$identifier]
            : null;
    }
1045971
public function getParameter($identifier)
    {
        return isset($this->parameters[$identifier]) ? $this->parameters[$identifier] : null;
    }
394970
public function getByIdentifier($identifier)
    {
        if (isset($this->nodesByIdentifier[$identifier])) {
            return $this->nodesByIdentifier[$identifier];
        }

        return false;
    }
857348
public function retrieveByID($identifier)
    {
        $user = $this->conn->{$this->table}->findOne(array('_id' => new \MongoId($identifier)));

        if ( ! is_null($user))
        {
            return new MongolUser((array) $user);
        }
    }
719497
public static function getAddonHavingComponentWithIdentifier(string $identifier)
    {
        $addons = self::getAddons();
        foreach ($addons as $addon) {
            foreach ($addon->getComponents() as $component) {
                if (empty($component->getIdentifier())) {
                    continue;
                }
                
                if ($component->getIdentifier() == $identifier) {
                    return $addon;
                }
            }
        }
        
        return null;
    }
814878
public function getResource($identifier)
    {
        /** @var UserEntity $user */
        $user = $this->userManager->findUserByUsername($identifier);
        if (!$user) {
            throw new NotFoundHttpException(
                $this->translator->trans('error.user_not_found', array('%id%' => $identifier))
            );
        }

        return $this->createResourceFromUser($user);
    }
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);
        }
    }
121445
public function findForPassport($identifier)
    {
        return (new static())->newQuery()->orWhere(function ($q) use ($identifier) {
            return $q->orWhere('email', $identifier)->orWhere('name', $identifier);
        })->where('enabled', 1)->first();
    }
486569
public function getAssignmentForIdentifier($identifier)
    {
        $assignment = $this->assignments->find(array('actortype' => (string) $identifier));
        $access = ($assignment) ? $assignment->access : self::ACCESS_NEVER;

        return (int) $access;
    }