namespace Shaarli\Front\Controller\Visitor;
use Shaarli\Front\Exception\LoginBannedException;
+use Shaarli\Render\TemplatePage;
use Slim\Http\Request;
use Slim\Http\Response;
if ($this->container->loginManager->isLoggedIn()
|| $this->container->conf->get('security.open_shaarli', false)
) {
- return $response->withRedirect('./');
+ return $this->redirect($response, '/');
}
$userCanLogin = $this->container->loginManager->canLogin($request->getServerParams());
->assignView('pagetitle', t('Login') .' - '. $this->container->conf->get('general.title', 'Shaarli'))
;
- return $response->write($this->render('loginform'));
+ return $response->write($this->render(TemplatePage::LOGIN));
}
}