mirror of
https://github.com/v2board/v2board.git
synced 2025-06-15 14:17:48 +08:00
update: fix user generate
This commit is contained in:
@ -179,6 +179,9 @@ class UserController extends Controller
|
||||
'uuid' => Helper::guid(true),
|
||||
'token' => Helper::guid()
|
||||
];
|
||||
if (User::where('email', $user['email'])->first()) {
|
||||
abort(500, '邮箱已存在于系统中');
|
||||
}
|
||||
$user['password'] = password_hash($request->input('password') ?? $user['email'], PASSWORD_DEFAULT);
|
||||
if (!User::create($user)) {
|
||||
abort(500, '生成失败');
|
||||
|
Reference in New Issue
Block a user