|
|
@@ -43,15 +43,14 @@ Route::get('/verify-email', function() { |
|
|
|
} |
|
|
|
})->middleware('auth')->name('verification.notice'); |
|
|
|
|
|
|
|
Route::get('/verify/{id}/{hash}', function (EmailVerificationRequest $request) { |
|
|
|
$user = User::find($id); |
|
|
|
|
|
|
|
if ($user->email_verified_at) { |
|
|
|
Route::get('/verify/{id}/{hash}', function (EmailVerificationRequest $request, $id) { |
|
|
|
if (Auth::user()->email_verified_at) { |
|
|
|
abort(404); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Auth::login($user); |
|
|
|
Auth::loginUsingId($id); |
|
|
|
$request->fulfill(); |
|
|
|
|
|
|
|
return redirect('/panel'); |
|
|
|
})->middleware(['signed'])->name('verification.verify'); |
|
|
|
|
|
|
|