mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-03 18:40:52 +08:00
feat: implement email case-insensitive queries (fix #318)
This commit is contained in:
@@ -43,7 +43,7 @@ class ResetPassword extends Command
|
||||
public function handle()
|
||||
{
|
||||
$password = $this->argument('password') ;
|
||||
$user = User::where('email', $this->argument('email'))->first();
|
||||
$user = User::byEmail($this->argument('email'))->first();
|
||||
if (!$user) abort(500, '邮箱不存在');
|
||||
$password = $password ?? Helper::guid(false);
|
||||
$user->password = password_hash($password, PASSWORD_DEFAULT);
|
||||
|
||||
Reference in New Issue
Block a user