From 5962cc5ab22bc07995b5886305255f93cab2a165 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 1 Jul 2009 12:47:30 +0000 Subject: - Patch #477944 by DamZ: more streamlining and clean-up of session handling code. --- modules/user/user.module | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'modules/user/user.module') diff --git a/modules/user/user.module b/modules/user/user.module index 6d884b5b9..29fb8c492 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1970,10 +1970,8 @@ function _user_cancel($edit, $account, $method) { // After cancelling account, ensure that user is logged out. if ($account->uid == $user->uid) { - // Destroy the current session. + // Destroy the current session, and reset $user to the anonymous user. session_destroy(); - // Load the anonymous user. - $user = drupal_anonymous_user(); } else { drupal_session_destroy_uid($account->uid); -- cgit v1.2.3