mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-04 23:36:44 +02:00
fix(install): add created superadmin to most powerful group in instance, ie. superadmin
This commit is contained in:
parent
19799f496d
commit
2ed511f8a0
1 changed files with 5 additions and 0 deletions
|
|
@ -98,6 +98,11 @@ class CreateSuperadmin extends BaseCommand
|
||||||
$user = new User($data);
|
$user = new User($data);
|
||||||
$userModel->save($user);
|
$userModel->save($user);
|
||||||
|
|
||||||
|
$user = $userModel->findById($userModel->getInsertID());
|
||||||
|
|
||||||
|
// set newly created user as most powerful instance group (superadmin)
|
||||||
|
$user->addGroup(setting('AuthGroups.mostPowerfulGroup'));
|
||||||
|
|
||||||
$this->write('Super admin "' . $username . '" created', 'green');
|
$this->write('Super admin "' . $username . '" created', 'green');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue