private function createUser($username, $password, $email)
{
if ($this->canUpdateRootUser()) {
$security = new Security();
$password_hash = $security->generatePasswordHash($password);
$result = $this->db->createCommand()->update('{{%user}}', ['username' => $username, 'password_hash' => $password_hash, 'email' => $email], ['id' => '1'])->execute();
if ($result > 0) {
return true;
}
}
return false;
}