fixing 310325
This commit is contained in:
parent
e683a81f46
commit
247f154cc8
@ -44,7 +44,7 @@ class LoginController extends Controller
|
||||
$throttles = (bool) setting('throttle_enabled');
|
||||
|
||||
//Redirect URL that can be passed as hidden field.
|
||||
$to = $request->has('to') ? '?to='.$request->get('to') : '';
|
||||
$to = $request->has('to') ? '?to=' . $request->get('to') : '';
|
||||
|
||||
if ($throttles && $this->hasTooManyLoginAttempts($request)) {
|
||||
return $this->sendLockoutResponse($request);
|
||||
@ -60,20 +60,20 @@ class LoginController extends Controller
|
||||
$this->incrementLoginAttempts($request);
|
||||
}
|
||||
|
||||
return redirect()->to('login'.$to)
|
||||
return redirect()->to('login' . $to)
|
||||
->withErrors(trans('auth.failed'));
|
||||
}
|
||||
|
||||
$user = Auth::getProvider()->retrieveByCredentials($credentials);
|
||||
|
||||
if ($user->isBanned()) {
|
||||
return redirect()->to('login'.$to)
|
||||
return redirect()->to('login' . $to)
|
||||
->withErrors(trans('auth.banned'));
|
||||
}
|
||||
|
||||
$maxSessions = setting('max_active_sessions');
|
||||
if ($maxSessions && $sessions->getActiveSessionsCount($user->id) >= $maxSessions) {
|
||||
return redirect()->to('login'.$to)
|
||||
return redirect()->to('login' . $to)
|
||||
->withErrors(trans('auth.max_sessions_reached'));
|
||||
}
|
||||
|
||||
@ -107,15 +107,14 @@ class LoginController extends Controller
|
||||
}
|
||||
|
||||
// Reindirizza in base al ruolo
|
||||
if ($user->hasRole('Admin')) {
|
||||
return redirect()->to('userarea/admin.php');
|
||||
} elseif ($user->hasRole('User')) {
|
||||
return redirect()->to('userarea/index.php');
|
||||
}
|
||||
|
||||
// Se il ruolo non è specificato, reindirizza alla home predefinita
|
||||
return redirect()->intended('/');
|
||||
if ($user->hasRole('Admin')) {
|
||||
return redirect()->to('userarea/import_dashboard.php');
|
||||
} elseif ($user->hasRole('User')) {
|
||||
return redirect()->to('userarea/index.php');
|
||||
}
|
||||
|
||||
// Se il ruolo non è specificato, reindirizza alla home predefinita
|
||||
return redirect()->intended('/');
|
||||
}
|
||||
|
||||
protected function logoutAndRedirectToTokenPage(Request $request, $user, ?string $redirectPage): RedirectResponse
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-center">
|
||||
<div>
|
||||
<p class="mb-0 text-dark">Bounce Rate</p>
|
||||
<p class="mb-0 text-dark">Other Stats</p>
|
||||
<h4 class="my-1 text-dark">34.46%</h4>
|
||||
<p class="mb-0 font-13 text-dark"><i class="bx bxs-down-arrow align-middle"></i>12.2% from last week</p>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user