aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/controller/visitor/LoginController.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-11-10 10:46:04 +0100
committerGitHub <noreply@github.com>2020-11-10 10:46:04 +0100
commit302662797cb5e8ac6579a99297ceae301f7927a6 (patch)
tree67f493a1cc6d3691742946f1d7e512bffe41e02f /application/front/controller/visitor/LoginController.php
parentc94c32d1a3e86a479cb2582eadc668a5bb476fc6 (diff)
parent2f4df753041088d788d1923692a7d530167a6840 (diff)
downloadShaarli-302662797cb5e8ac6579a99297ceae301f7927a6.tar.gz
Shaarli-302662797cb5e8ac6579a99297ceae301f7927a6.tar.zst
Shaarli-302662797cb5e8ac6579a99297ceae301f7927a6.zip
Merge pull request #1635 from ArthurHoaro/feature/phpcs
Diffstat (limited to 'application/front/controller/visitor/LoginController.php')
-rw-r--r--application/front/controller/visitor/LoginController.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/application/front/controller/visitor/LoginController.php b/application/front/controller/visitor/LoginController.php
index f5038fe3..4b881535 100644
--- a/application/front/controller/visitor/LoginController.php
+++ b/application/front/controller/visitor/LoginController.php
@@ -43,7 +43,7 @@ class LoginController extends ShaarliVisitorController
43 $this 43 $this
44 ->assignView('returnurl', escape($returnUrl)) 44 ->assignView('returnurl', escape($returnUrl))
45 ->assignView('remember_user_default', $this->container->conf->get('privacy.remember_user_default', true)) 45 ->assignView('remember_user_default', $this->container->conf->get('privacy.remember_user_default', true))
46 ->assignView('pagetitle', t('Login') .' - '. $this->container->conf->get('general.title', 'Shaarli')) 46 ->assignView('pagetitle', t('Login') . ' - ' . $this->container->conf->get('general.title', 'Shaarli'))
47 ; 47 ;
48 48
49 return $response->write($this->render(TemplatePage::LOGIN)); 49 return $response->write($this->render(TemplatePage::LOGIN));
@@ -64,7 +64,8 @@ class LoginController extends ShaarliVisitorController
64 return $this->redirect($response, '/'); 64 return $this->redirect($response, '/');
65 } 65 }
66 66
67 if (!$this->container->loginManager->checkCredentials( 67 if (
68 !$this->container->loginManager->checkCredentials(
68 client_ip_id($this->container->environment), 69 client_ip_id($this->container->environment),
69 $request->getParam('login'), 70 $request->getParam('login'),
70 $request->getParam('password') 71 $request->getParam('password')
@@ -101,7 +102,8 @@ class LoginController extends ShaarliVisitorController
101 */ 102 */
102 protected function checkLoginState(): bool 103 protected function checkLoginState(): bool
103 { 104 {
104 if ($this->container->loginManager->isLoggedIn() 105 if (
106 $this->container->loginManager->isLoggedIn()
105 || $this->container->conf->get('security.open_shaarli', false) 107 || $this->container->conf->get('security.open_shaarli', false)
106 ) { 108 ) {
107 throw new CantLoginException(); 109 throw new CantLoginException();