public function __construct(PDO
$connection) { $this->connection =
$connection;
} /**
* @throws RuntimeException
*/
public function createAdmin(AdminUser
$user) { $localeId =
$this->
getLocaleId($user);
// Drop previous inserted admins
$this->connection->
query('DELETE FROM s_core_auth'
);
$sql = <<<'EOT'
INSERT INTO s_core_auth
(roleID,username,password,encoder,localeID,`name`,email,active,lockeduntil)
VALUES
(1,?,?,?,?,?,?,1,NOW());
EOT;