feat: implement email case-insensitive queries (fix #318)

This commit is contained in:
xboard
2026-03-28 07:07:57 +08:00
parent a6c37bb112
commit 7fbd1bb92d
9 changed files with 64 additions and 11 deletions

View File

@@ -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);