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

createUser() public method

Create user.
public createUser ( eZ\Publish\SPI\Persistence\User $user ) : mixed
$user eZ\Publish\SPI\Persistence\User
return mixed
    public function createUser(User $user)
    {
        $query = $this->handler->createInsertQuery();
        $query->insertInto($this->handler->quoteTable('ezuser'))->set($this->handler->quoteColumn('contentobject_id'), $query->bindValue($user->id, null, \PDO::PARAM_INT))->set($this->handler->quoteColumn('login'), $query->bindValue($user->login))->set($this->handler->quoteColumn('email'), $query->bindValue($user->email))->set($this->handler->quoteColumn('password_hash'), $query->bindValue($user->passwordHash))->set($this->handler->quoteColumn('password_hash_type'), $query->bindValue($user->hashAlgorithm, null, \PDO::PARAM_INT));
        $query->prepare()->execute();
        $query = $this->handler->createInsertQuery();
        $query->insertInto($this->handler->quoteTable('ezuser_setting'))->set($this->handler->quoteColumn('user_id'), $query->bindValue($user->id, null, \PDO::PARAM_INT))->set($this->handler->quoteColumn('is_enabled'), $query->bindValue($user->isEnabled, null, \PDO::PARAM_INT))->set($this->handler->quoteColumn('max_login'), $query->bindValue($user->maxLogin, null, \PDO::PARAM_INT));
        $query->prepare()->execute();
    }