eZ\Publish\Core\Persistence\Legacy\User\Handler::loadByLogin PHP Method

loadByLogin() public method

Loads user with user login.
public loadByLogin ( string $login ) : eZ\Publish\SPI\Persistence\User
$login string
return eZ\Publish\SPI\Persistence\User
    public function loadByLogin($login)
    {
        $data = $this->userGateway->loadByLogin($login);
        if (empty($data)) {
            throw new NotFound('user', $login);
        } elseif (isset($data[1])) {
            throw new LogicException("Found more then one user with login '{$login}'");
        }
        return $this->mapper->mapUser($data[0]);
    }