fixed a bug in the authentication system, thx mr_sose

This commit is contained in:
noxy
2019-11-11 09:52:33 +00:00
parent 2d57d87ce6
commit af06b58813
6 changed files with 47 additions and 7 deletions

View File

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