|
|
@ -62,7 +62,11 @@ class AuthController extends BaseController
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function login(): Response
|
|
|
|
public function login(): Response
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return !$this->auth->user() ? $this->showLogin() : $this->redirect->to($this->config->get('home_site'));
|
|
|
|
if ($this->auth->user()) {
|
|
|
|
|
|
|
|
return $this->redirect->to($this->config->get('home_site'));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this->showLogin();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -84,6 +88,10 @@ class AuthController extends BaseController
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function postLogin(Request $request): Response
|
|
|
|
public function postLogin(Request $request): Response
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if ($this->auth->user()) {
|
|
|
|
|
|
|
|
return $this->redirect->to($this->config->get('home_site'));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$data = $this->validate($request, [
|
|
|
|
$data = $this->validate($request, [
|
|
|
|
'login' => 'required',
|
|
|
|
'login' => 'required',
|
|
|
|
'password' => 'required',
|
|
|
|
'password' => 'required',
|
|
|
|