- Fix broken session deleting on account blocking.
parent
9803bc4321
commit
ea08f062b2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue