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 |
@@ -18,7 +18,7 @@ Route::get('/', ['as' => 'home', function () {
|
||||
|
||||
return redirect($video->id);
|
||||
|
||||
}])->middleware('auth');
|
||||
}])/*->middleware('auth')*/;
|
||||
|
||||
Route::get('nojs', function() { return view('nojs'); });
|
||||
|
||||
@@ -145,7 +145,8 @@ Route::group(["middleware" => "theme"], function() {
|
||||
# 'donations' => \App\Models\Donation::orderBy('timestamp', 'DESC')->get()
|
||||
# ]);
|
||||
#});
|
||||
Route::get('login', function() { return view('login'); });
|
||||
#Route::get('login', function() { return view('login'); });
|
||||
Route::get('login', 'UserController@loggain');
|
||||
#Route::get('counter-strike', function() { return view('counter-strike'); });
|
||||
|
||||
Route::get('{id}', 'VideoController@show')->where('id', '[0-9]+');
|
||||
|
Reference in New Issue
Block a user