Index: user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user.module,v retrieving revision 1.440 diff -u -r1.440 user.module --- user.module 10 Feb 2005 19:19:43 -0000 1.440 +++ user.module 12 Feb 2005 15:49:24 -0000 @@ -788,6 +788,13 @@ user_module_invoke('login', $edit, $user); + // Get the path to set the cookie for + $path = preg_replace("/.+\/\/[^\/]+(.*)/", "\$1/", $base_url); + // Find out how long we should keep the cookie session for + $session_lifetime = variable_get('user_session_lifetime', 345600); + // Set the cookie + setcookie(session_name(), session_id(), time() + $session_lifetime, $path); + // Redirect the user to the page he logged on from. drupal_goto(); } @@ -1248,6 +1255,11 @@ $group .= form_textfield(t('Subject of password recovery e-mail'), 'user_mail_pass_subject', _user_mail_text('pass_subject'), 70, 180, t('Customize the Subject of your forgotten password e-mail.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %date, %login_uri, %edit_uri.'); $group .= form_textarea(t('Body of password recovery e-mail'), 'user_mail_pass_body', _user_mail_text('pass_body'), 70, 10, t('Customize the body of the forgotten password e-mail.') .' '. t('Available variables are:') .' %username, %site, %password, %uri, %uri_brief, %mailto, %login_uri, %edit_uri.'); $output .= form_group(t('User email settings'), $group); + + // Session settings + $session_length = drupal_map_assoc(array(86400, 172800, 345600, 604800, 1209600, 2419200, 4838400), "format_interval"); + $group = form_select(t('User Session length'), 'user_session_lifetime', variable_get('user_session_lifetime', 345600), $session_length, t('Length of time that users\' sessions should be remembered?')); + $output .= form_group(t('Session settings'), $group); // Picture settings. file_check_directory(file_create_path(variable_get('user_picture_path', 'pictures')), 1, 'user_picture_path');