]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/front/controllers/LoginController.php
Rename ci attribute to container
[github/shaarli/Shaarli.git] / application / front / controllers / LoginController.php
index 23efb592d853ec77fa90cf2b9e0c5ec029f84f38..ae3599e0452d93d3edd6b13941b4c48cf47e0222 100644 (file)
@@ -22,11 +22,13 @@ class LoginController extends ShaarliController
 {
     public function index(Request $request, Response $response): Response
     {
-        if ($this->ci->loginManager->isLoggedIn() || $this->ci->conf->get('security.open_shaarli', false)) {
+        if ($this->container->loginManager->isLoggedIn()
+            || $this->container->conf->get('security.open_shaarli', false)
+        ) {
             return $response->withRedirect('./');
         }
 
-        $userCanLogin = $this->ci->loginManager->canLogin($request->getServerParams());
+        $userCanLogin = $this->container->loginManager->canLogin($request->getServerParams());
         if ($userCanLogin !== true) {
             throw new LoginBannedException();
         }
@@ -37,8 +39,8 @@ class LoginController extends ShaarliController
 
         $this
             ->assignView('returnurl', escape($request->getServerParam('HTTP_REFERER')))
-            ->assignView('remember_user_default', $this->ci->conf->get('privacy.remember_user_default', true))
-            ->assignView('pagetitle', t('Login') .' - '. $this->ci->conf->get('general.title', 'Shaarli'))
+            ->assignView('remember_user_default', $this->container->conf->get('privacy.remember_user_default', true))
+            ->assignView('pagetitle', t('Login') .' - '. $this->container->conf->get('general.title', 'Shaarli'))
         ;
 
         return $response->write($this->render('loginform'));