mirror of
				https://github.com/v2board/v2board.git
				synced 2025-11-01 01:41:47 +08:00 
			
		
		
		
	update: install random password
This commit is contained in:
		| @@ -89,16 +89,15 @@ class V2boardInstall extends Command | |||||||
|             while (!$email) { |             while (!$email) { | ||||||
|                 $email = $this->ask('请输入管理员邮箱?'); |                 $email = $this->ask('请输入管理员邮箱?'); | ||||||
|             } |             } | ||||||
|             $password = ''; |             $password = Helper::guid(false); | ||||||
|             while (!$password) { |  | ||||||
|                 $password = $this->ask('请输入管理员密码?'); |  | ||||||
|             } |  | ||||||
|             if (!$this->registerAdmin($email, $password)) { |             if (!$this->registerAdmin($email, $password)) { | ||||||
|                 abort(500, '管理员账号注册失败,请重试'); |                 abort(500, '管理员账号注册失败,请重试'); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             $this->info('一切就绪'); |             $this->info('一切就绪'); | ||||||
|             $this->info('访问 http(s)://你的站点/admin 进入管理面板'); |             $this->info("管理员邮箱:{$email}"); | ||||||
|  |             $this->info("管理员密码:{$password}"); | ||||||
|  |             $this->info('访问 http(s)://你的站点/admin 进入管理面板,你可以用户中心修改你的密码,请设置安全复杂的密码。'); | ||||||
|         } catch (\Exception $e) { |         } catch (\Exception $e) { | ||||||
|             $this->error($e->getMessage()); |             $this->error($e->getMessage()); | ||||||
|         } |         } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user