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

loadByEmail() public method

Loads user with user email.
public loadByEmail ( string $email ) : array
$email string
return array
    public function loadByEmail($email)
    {
        $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('email', 'ezuser'), $query->bindValue($email, null, \PDO::PARAM_STR)));
        $statement = $query->prepare();
        $statement->execute();
        return $statement->fetchAll(\PDO::FETCH_ASSOC);
    }