mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Make sure 1st admin user creation does not fail with error 500 (#12119)
* Make sure 1st admin user creation does not fail with error 500 * Update MakeUserController.php just init it to the default fail message * Update MakeUserController.php * just struggling with the github editor :P Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
@@ -64,6 +64,8 @@ class MakeUserController extends InstallationController implements InstallerStep
|
||||
'password' => 'required',
|
||||
]);
|
||||
|
||||
$message = trans('install.user.failure');
|
||||
|
||||
try {
|
||||
// only allow the first admin to be created
|
||||
if (! $this->complete()) {
|
||||
@@ -73,7 +75,6 @@ class MakeUserController extends InstallationController implements InstallerStep
|
||||
$user->setPassword($request->get('password'));
|
||||
$res = $user->save();
|
||||
|
||||
$message = trans('install.user.failure');
|
||||
if ($res) {
|
||||
$message = trans('install.user.success');
|
||||
$this->markStepComplete();
|
||||
|
Reference in New Issue
Block a user