From e4dd4e889a4ca33e4fadae87895ab6d657ad9ad2 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 20 Dec 2009 20:50:29 +0000 Subject: 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 --- engine/lib/users.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'engine') 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"); } -- cgit v1.2.3