- if ($conf->get('security.open_shaarli')) {
- header('Location: ?');
- exit;
- } // No need to login for open Shaarli
- if (isset($_GET['username'])) {
- $PAGE->assign('username', escape($_GET['username']));
- }
- $PAGE->assign('returnurl', (isset($_SERVER['HTTP_REFERER']) ? escape($_SERVER['HTTP_REFERER']):''));
- // add default state of the 'remember me' checkbox
- $PAGE->assign('remember_user_default', $conf->get('privacy.remember_user_default'));
- $PAGE->assign('user_can_login', $loginManager->canLogin($_SERVER));
- $PAGE->assign('pagetitle', t('Login') .' - '. $conf->get('general.title', 'Shaarli'));
- $PAGE->renderPage('loginform');