summaryrefslogtreecommitdiff
path: root/modules/user/user.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-07-01 12:47:30 +0000
committerDries Buytaert <dries@buytaert.net>2009-07-01 12:47:30 +0000
commit5962cc5ab22bc07995b5886305255f93cab2a165 (patch)
tree5ab79c7b8b62b994c37ab0e82f45653b38eb6628 /modules/user/user.module
parent907faab2bbf0e4b701c7a2d73f653f513ff911cd (diff)
downloadbrdo-5962cc5ab22bc07995b5886305255f93cab2a165.tar.gz
brdo-5962cc5ab22bc07995b5886305255f93cab2a165.tar.bz2
- Patch #477944 by DamZ: more streamlining and clean-up of session handling code.
Diffstat (limited to 'modules/user/user.module')
-rw-r--r--modules/user/user.module4
1 files changed, 1 insertions, 3 deletions
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);