Skip to content

Commit

Permalink
Sign in page should redirect authenticated users to the backend (#1131)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjauvin committed May 21, 2024
1 parent 42699cc commit ddca17f
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions modules/backend/controllers/Auth.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php namespace Backend\Controllers;

use Mail;
use Flash;
use ApplicationException;
use Backend;
use Request;
use Validator;
use BackendAuth;
use Backend\Models\AccessLog;
use Backend\Classes\Controller;
use Backend\Models\AccessLog;
use Config;
use Exception;
use Flash;
use Mail;
use Request;
use System\Classes\UpdateManager;
use ApplicationException;
use ValidationException;
use Exception;
use Config;
use Validator;
use Winter\Storm\Foundation\Http\Middleware\CheckForTrustedHost;

/**
Expand Down Expand Up @@ -52,6 +52,10 @@ public function index()
*/
public function signin()
{
if (BackendAuth::user()) {
return Backend::redirect('backend');
}

$this->bodyClass = 'signin';

// Clear Cache and any previous data to fix invalid security token issue
Expand Down

0 comments on commit ddca17f

Please sign in to comment.