Commit ea08f062 authored by Steven Wittens's avatar Steven Wittens

- Fix broken session deleting on account blocking.

parent 9803bc43
......@@ -138,8 +138,8 @@ function user_save($account, $array = array(), $category = 'account') {
}
// Delete a blocked user's sessions to kick them if they are online.
if ($user->status == 0) {
db_query('DELETE FROM {sessions} WHERE uid = %d', $user->uid);
if ($array['status'] == 0) {
db_query('DELETE FROM {sessions} WHERE uid = %d', $account->uid);
}
// Refresh user object
......
......@@ -138,8 +138,8 @@ function user_save($account, $array = array(), $category = 'account') {
}
// Delete a blocked user's sessions to kick them if they are online.
if ($user->status == 0) {
db_query('DELETE FROM {sessions} WHERE uid = %d', $user->uid);
if ($array['status'] == 0) {
db_query('DELETE FROM {sessions} WHERE uid = %d', $account->uid);
}
// Refresh user object
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment