aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/controllers/LoginController.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-01-26 09:06:13 +0100
committerArthurHoaro <arthur@hoa.ro>2020-01-26 11:34:29 +0100
commit27ceea2aeeed69b43fef4ebff35ec8004fcc2e45 (patch)
treed5a03a3e425180f1fafb646c8ec68a4b8458d0b3 /application/front/controllers/LoginController.php
parent0498b209b551cad5595312583e5d6fb1bc3303a5 (diff)
downloadShaarli-27ceea2aeeed69b43fef4ebff35ec8004fcc2e45.tar.gz
Shaarli-27ceea2aeeed69b43fef4ebff35ec8004fcc2e45.tar.zst
Shaarli-27ceea2aeeed69b43fef4ebff35ec8004fcc2e45.zip
Rename ci attribute to container
Diffstat (limited to 'application/front/controllers/LoginController.php')
-rw-r--r--application/front/controllers/LoginController.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/application/front/controllers/LoginController.php b/application/front/controllers/LoginController.php
index 23efb592..ae3599e0 100644
--- a/application/front/controllers/LoginController.php
+++ b/application/front/controllers/LoginController.php
@@ -22,11 +22,13 @@ class LoginController extends ShaarliController
22{ 22{
23 public function index(Request $request, Response $response): Response 23 public function index(Request $request, Response $response): Response
24 { 24 {
25 if ($this->ci->loginManager->isLoggedIn() || $this->ci->conf->get('security.open_shaarli', false)) { 25 if ($this->container->loginManager->isLoggedIn()
26 || $this->container->conf->get('security.open_shaarli', false)
27 ) {
26 return $response->withRedirect('./'); 28 return $response->withRedirect('./');
27 } 29 }
28 30
29 $userCanLogin = $this->ci->loginManager->canLogin($request->getServerParams()); 31 $userCanLogin = $this->container->loginManager->canLogin($request->getServerParams());
30 if ($userCanLogin !== true) { 32 if ($userCanLogin !== true) {
31 throw new LoginBannedException(); 33 throw new LoginBannedException();
32 } 34 }
@@ -37,8 +39,8 @@ class LoginController extends ShaarliController
37 39
38 $this 40 $this
39 ->assignView('returnurl', escape($request->getServerParam('HTTP_REFERER'))) 41 ->assignView('returnurl', escape($request->getServerParam('HTTP_REFERER')))
40 ->assignView('remember_user_default', $this->ci->conf->get('privacy.remember_user_default', true)) 42 ->assignView('remember_user_default', $this->container->conf->get('privacy.remember_user_default', true))
41 ->assignView('pagetitle', t('Login') .' - '. $this->ci->conf->get('general.title', 'Shaarli')) 43 ->assignView('pagetitle', t('Login') .' - '. $this->container->conf->get('general.title', 'Shaarli'))
42 ; 44 ;
43 45
44 return $response->write($this->render('loginform')); 46 return $response->write($this->render('loginform'));