eZ\Publish\Core\Persistence\Legacy\User\Gateway\DoctrineDatabase::load PHP Method

load() public method

Loads user with user ID.
public load ( mixed $userId ) : array
$userId mixed
return array
    public function load($userId)
    {
        $query = $this->handler->createSelectQuery();
        $query->select($this->handler->quoteColumn('contentobject_id', 'ezuser'), $this->handler->quoteColumn('login', 'ezuser'), $this->handler->quoteColumn('email', 'ezuser'), $this->handler->quoteColumn('password_hash', 'ezuser'), $this->handler->quoteColumn('password_hash_type', 'ezuser'), $this->handler->quoteColumn('is_enabled', 'ezuser_setting'), $this->handler->quoteColumn('max_login', 'ezuser_setting'))->from($this->handler->quoteTable('ezuser'))->leftJoin($this->handler->quoteTable('ezuser_setting'), $query->expr->eq($this->handler->quoteColumn('user_id', 'ezuser_setting'), $this->handler->quoteColumn('contentobject_id', 'ezuser')))->where($query->expr->eq($this->handler->quoteColumn('contentobject_id', 'ezuser'), $query->bindValue($userId, null, \PDO::PARAM_INT)));
        $statement = $query->prepare();
        $statement->execute();
        return $statement->fetchAll(\PDO::FETCH_ASSOC);
    }