Index: session_expire.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/session_expire/session_expire.module,v retrieving revision 1.2 diff -u -r1.2 session_expire.module --- session_expire.module 27 Nov 2008 16:46:00 -0000 1.2 +++ session_expire.module 3 Dec 2008 15:38:51 -0000 @@ -1,24 +1,32 @@ - MENU_NORMAL_ITEM, - 'title' => t('Session expire'), - 'description' => t('Settings for session expiry'), - 'page callback' => 'drupal_get_form', - 'page arguments' => array('session_expire_settings'), - 'access arguments' => array('administer site configuration'), - ); + $items['admin/settings/session_expire'] = array( + 'type' => MENU_NORMAL_ITEM, + 'title' => 'Session expire', + 'description' => 'Settings for session expiry', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('session_expire_settings'), + 'access arguments' => array('administer site configuration'), + ); return $items; } @@ -62,6 +70,9 @@ return system_settings_form($form); } +/** + * Implementation of hook_cron(). + */ function session_expire_cron() { // Check if it is the first time this hook fires $last_run_time = variable_get(SESSION_EXPIRE_LAST, 0); @@ -75,6 +86,7 @@ $timestamp = time() - variable_get(SESSION_EXPIRE_AGE, 604800); // Check if we should delete anonymous only or both anonymous and authenticated users + $extra_cond = ''; $mode = variable_get(SESSION_EXPIRE_MODE, 0); if (!$mode) { $extra_cond = 'AND uid = 0';