fixed a bug in the authentication system, thx mr_sose
This commit is contained in:
@@ -31,7 +31,9 @@ class UserController extends Controller
|
||||
{
|
||||
case Verify::SUCCESS:
|
||||
#\Session::put('background', auth()->user()->background);
|
||||
return redirect("/")->with('success', 'Login successful');
|
||||
#return redirect("/main")->with('success', 'Login successful');
|
||||
return redirect()->back()->with('success', 'Login successful');
|
||||
#return back('/main')->with('success', 'Login successful');
|
||||
case Verify::INVALID_CREDENTIALS:
|
||||
return redirect()->back()->with('error', 'Invalid credentials');
|
||||
case Verify::DISABLED:
|
||||
@@ -121,6 +123,16 @@ class UserController extends Controller
|
||||
return view('apply');
|
||||
}
|
||||
|
||||
public function loggain()
|
||||
{
|
||||
if(auth()->check()) {
|
||||
\Session::reflash();
|
||||
\Session::flash('info', 'Cannot login when logged in, lmao');
|
||||
return redirect('/');
|
||||
}
|
||||
return view('login');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 545 KiB After Width: | Height: | Size: 771 B |
Reference in New Issue
Block a user