aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-12-20 20:50:29 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-12-20 20:50:29 +0000
commite4dd4e889a4ca33e4fadae87895ab6d657ad9ad2 (patch)
tree7916390d0db51d46b4d452ba6022608aa5c5a1f6 /engine
parentdf22b23fa92a64277631109593016a7f7e8fd22b (diff)
downloadelgg-e4dd4e889a4ca33e4fadae87895ab6d657ad9ad2.tar.gz
elgg-e4dd4e889a4ca33e4fadae87895ab6d657ad9ad2.tar.bz2
fixes #1322 - "remember me" cookie code is cleared when a user is banned
git-svn-id: http://code.elgg.org/elgg/trunk@3775 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/users.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 0857c520a..801eb862b 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -481,7 +481,11 @@ function ban_user($user_guid, $reason = "") {
if ($reason) {
create_metadata($user_guid, 'ban_reason', $reason,'', 0, ACCESS_PUBLIC);
}
-
+
+ // clear "remember me" cookie code so user cannot login in using it
+ $user->code = "";
+ $user->save();
+
// Set ban flag
return update_data("UPDATE {$CONFIG->dbprefix}users_entity set banned='yes' where guid=$user_guid");
}