mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update: middleware
This commit is contained in:
parent
760d248e4e
commit
9c711b4ea6
@ -20,11 +20,10 @@ class User
|
|||||||
$user = \App\Models\User::where('password', $authData[1])
|
$user = \App\Models\User::where('password', $authData[1])
|
||||||
->where('email', $authData[0])
|
->where('email', $authData[0])
|
||||||
->first();
|
->first();
|
||||||
if ($user) {
|
if (!$user) abort(500, '鉴权失败,请重新登入');
|
||||||
$request->session()->put('email', $user->email);
|
$request->session()->put('email', $user->email);
|
||||||
$request->session()->put('id', $user->id);
|
$request->session()->put('id', $user->id);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// if ($request->input('lang')) {
|
// if ($request->input('lang')) {
|
||||||
// $request->session()->put('lang', $request->input('lang'));
|
// $request->session()->put('lang', $request->input('lang'));
|
||||||
// }
|
// }
|
||||||
|
Loading…
Reference in New Issue
Block a user