From 17f89d7e697c716eb2ba57544d2b4d4394ce7ef4 Mon Sep 17 00:00:00 2001 From: Michael Klier Date: Sun, 12 Oct 2008 16:42:53 +0200 Subject: FS#564 FS#1270 new option to disable the rememberme checkbox darcs-hash:20081012144253-23886-c904f82c559c3ad5477bf921e93cb439a212134d.gz --- inc/auth.php | 1 + inc/html.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/auth.php b/inc/auth.php index 1eef0db91..0d267cb27 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -59,6 +59,7 @@ if (!isset($_REQUEST['p'])) $_REQUEST['p'] = ''; if (!isset($_REQUEST['r'])) $_REQUEST['r'] = ''; $_REQUEST['http_credentials'] = false; + if (!$conf['rememberme']) $_REQUEST['r'] = false; // if no credentials were given try to use HTTP auth (for SSO) if(empty($_REQUEST['u']) && empty($_COOKIE[DOKU_COOKIE]) && !empty($_SERVER['PHP_AUTH_USER'])){ diff --git a/inc/html.php b/inc/html.php index e714828ee..73e47bf2b 100644 --- a/inc/html.php +++ b/inc/html.php @@ -58,7 +58,9 @@ function html_login(){ $form->addHidden('do', 'login'); $form->addElement(form_makeTextField('u', ((!$_REQUEST['http_credentials']) ? $_REQUEST['u'] : ''), $lang['user'], 'focus__this', 'block')); $form->addElement(form_makePasswordField('p', $lang['pass'], '', 'block')); - $form->addElement(form_makeCheckboxField('r', '1', $lang['remember'], 'remember__me', 'simple')); + if($conf['rememberme']) { + $form->addElement(form_makeCheckboxField('r', '1', $lang['remember'], 'remember__me', 'simple')); + } $form->addElement(form_makeButton('submit', '', $lang['btn_login'])); $form->endFieldset(); html_form('login', $form); -- cgit v1.2.3