diff --git a/app/Http/Controllers/Web/Auth/LoginController.php b/app/Http/Controllers/Web/Auth/LoginController.php index 0322a12..d4a9248 100644 --- a/app/Http/Controllers/Web/Auth/LoginController.php +++ b/app/Http/Controllers/Web/Auth/LoginController.php @@ -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 diff --git a/public/userarea/top_stat_widget.php b/public/userarea/top_stat_widget.php index 2217cfa..6e63a57 100644 --- a/public/userarea/top_stat_widget.php +++ b/public/userarea/top_stat_widget.php @@ -50,7 +50,7 @@
-

Bounce Rate

+

Other Stats

34.46%

12.2% from last week