@@ -78,10 +78,10 @@ discard block |
||
| 78 | 78 | $this->initSystemCheck(); |
| 79 | 79 | return; |
| 80 | 80 | if ($this->confirm('Do you wish to continue?')) { |
| 81 | - if(!$this->acceptLicense()){ |
|
| 81 | + if (!$this->acceptLicense()) { |
|
| 82 | 82 | return; |
| 83 | 83 | } |
| 84 | - if($this->createFrontAdminUser()){ |
|
| 84 | + if ($this->createFrontAdminUser()) { |
|
| 85 | 85 | $this->createFrontAdminGroup(); |
| 86 | 86 | } |
| 87 | 87 | $this->installBabelExtensionNOJ(); |
@@ -119,19 +119,19 @@ discard block |
||
| 119 | 119 | protected function createFrontAdminUser() { |
| 120 | 120 | $this->line('Creating frontstage admin user...'); |
| 121 | 121 | $this->comment(''); |
| 122 | - $shallCreate = true; |
|
| 122 | + $shallCreate=true; |
|
| 123 | 123 | if (User::count()) { |
| 124 | - $shallCreate = $this->confirm('Detected existing frontstage user, do you really want to create frontstage admin?'); |
|
| 124 | + $shallCreate=$this->confirm('Detected existing frontstage user, do you really want to create frontstage admin?'); |
|
| 125 | 125 | $this->comment(''); |
| 126 | 126 | } |
| 127 | 127 | if (!$shallCreate) { |
| 128 | 128 | return false; |
| 129 | 129 | } |
| 130 | - while(true) { |
|
| 130 | + while (true) { |
|
| 131 | 131 | try { |
| 132 | - $createdUser = $this->createFrontUser(); |
|
| 132 | + $createdUser=$this->createFrontUser(); |
|
| 133 | 133 | break; |
| 134 | - } catch(Exception $e) { |
|
| 134 | + } catch (Exception $e) { |
|
| 135 | 135 | $this->line("\n <bg=red;fg=white> Exception </> : <fg=yellow>Error occured while creating admin user.</>\n"); |
| 136 | 136 | continue; |
| 137 | 137 | } |
@@ -140,9 +140,9 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | private function createFrontUser() { |
| 143 | - $username = $this->ask('Please choose a username:', 'admin'); |
|
| 144 | - $email = $this->ask('Please choose a email address:', '[email protected]'); |
|
| 145 | - $password = Hash::make(Str::random(8)); |
|
| 143 | + $username=$this->ask('Please choose a username:', 'admin'); |
|
| 144 | + $email=$this->ask('Please choose a email address:', '[email protected]'); |
|
| 145 | + $password=Hash::make(Str::random(8)); |
|
| 146 | 146 | $createdUser=User::create([ |
| 147 | 147 | 'name' => $username, |
| 148 | 148 | 'email' => $email, |