diff -r ea43ac1ff2ee -r f2a824ce5f18 plugins/SpecialUserFuncs.php
--- a/plugins/SpecialUserFuncs.php Tue Aug 12 00:05:09 2008 -0400
+++ b/plugins/SpecialUserFuncs.php Tue Aug 12 00:06:35 2008 -0400
@@ -349,6 +349,52 @@
}
?>
get('user_login_check_remember_infinite');
+ }
+ else
+ {
+ // is the number of days evenly divisible by 7? if so, use weeks
+ if ( $session_time % 7 == 0 )
+ {
+ $session_time = $session_time / 7;
+ $unit = 'week';
+ }
+ else
+ {
+ $unit = 'day';
+ }
+ // if it's not equal to 1, pluralize it
+ if ( $session_time != 1 )
+ {
+ $unit .= 's';
+ }
+ $text_remember = $lang->get('user_login_check_remember', array(
+ 'session_length' => $session_time,
+ 'length_units' => $lang->get("etc_unit_$unit")
+ ));
+ }
+ ?>
+
+
+ get('user_login_field_remember'); ?>
+ |
+
+
+ |
+
+
@@ -386,7 +432,7 @@
?>
- |
+ |
@@ -479,7 +525,7 @@
$captcha_code = ( isset($_POST['captcha_code']) ) ? $_POST['captcha_code'] : false;
if ( $_POST['use_crypt'] == 'yes' )
{
- $result = $session->login_with_crypto($_POST['username'], $_POST['crypt_data'], $_POST['crypt_key'], $_POST['challenge_data'], intval($_POST['auth_level']), $captcha_hash, $captcha_code);
+ $result = $session->login_with_crypto($_POST['username'], $_POST['crypt_data'], $_POST['crypt_key'], $_POST['challenge_data'], intval($_POST['auth_level']), $captcha_hash, $captcha_code, isset($_POST['remember']));
}
else if ( $_POST['use_crypt'] == 'yes_dh' )
{
@@ -551,11 +597,11 @@
$aes = AESCrypt::singleton(AES_BITS, AES_BLOCKSIZE);
$password = $aes->decrypt($_POST['crypt_data'], $aes_key, ENC_HEX);
- $result = $session->login_without_crypto($_POST['username'], $password, false, intval($_POST['auth_level']), $captcha_hash, $captcha_code);
+ $result = $session->login_without_crypto($_POST['username'], $password, false, intval($_POST['auth_level']), $captcha_hash, $captcha_code, isset($_POST['remember']));
}
else
{
- $result = $session->login_without_crypto($_POST['username'], $_POST['pass'], false, intval($_POST['auth_level']), $captcha_hash, $captcha_code);
+ $result = $session->login_without_crypto($_POST['username'], $_POST['pass'], false, intval($_POST['auth_level']), $captcha_hash, $captcha_code, isset($_POST['remember']));
}
if($result['success'])