Index: no_anon.module =================================================================== --- no_anon.module (revision 5862) +++ no_anon.module (working copy) @@ -4,14 +4,12 @@ /* * Implementation of hook_form_alter(). */ -function no_anon_form_alter(&$form, $form_state, $form_id) { +function no_anon_form_alter($form_id, &$form) { switch ($form_id) { case 'user_login': case 'user_login_block': case 'user_pass_reset': - if ($form_state['post']) { // Someone's attempting to log in. Let's allow session cookies. ini_set('session.use_cookies', 1); - } } } Index: session-no-anon.inc =================================================================== --- session-no-anon.inc (revision 5862) +++ session-no-anon.inc (working copy) @@ -70,7 +70,7 @@ return TRUE; } - db_query("UPDATE {sessions} SET uid = %d, cache = %d, hostname = '%s', session = '%s', timestamp = %d WHERE sid = '%s'", $user->uid, isset($user->cache) ? $user->cache : '', ip_address(), $value, time(), $key); + db_query("UPDATE {sessions} SET uid = %d, cache = %d, hostname = '%s', session = '%s', timestamp = %d WHERE sid = '%s'", $user->uid, isset($user->cache) ? $user->cache : '', $_SERVER['REMOTE_ADDR'], $value, time(), $key); if (db_affected_rows()) { // Last access time is updated no more frequently than once every 180 seconds. // This reduces contention in the users table. @@ -81,7 +81,7 @@ else { // If this query fails, another parallel request probably got here first. // In that case, any session data generated in this request is discarded. - @db_query("INSERT INTO {sessions} (sid, uid, cache, hostname, session, timestamp) VALUES ('%s', %d, %d, '%s', '%s', %d)", $key, $user->uid, isset($user->cache) ? $user->cache : '', ip_address(), $value, time()); + @db_query("INSERT INTO {sessions} (sid, uid, cache, hostname, session, timestamp) VALUES ('%s', %d, %d, '%s', '%s', %d)", $key, $user->uid, isset($user->cache) ? $user->cache : '', $_SERVER['REMOTE_ADDR'], $value, time()); } return TRUE;