Commit 27625fcf authored by Dries's avatar Dries

- Patch #31341 by kbahey: delete a user's session when the user is deleted.

parent a1ae4da7
......@@ -1267,6 +1267,7 @@ function user_edit($category = 'account') {
else if (arg(2) == 'delete') {
if ($edit['confirm']) {
db_query('DELETE FROM {users} WHERE uid = %d', $account->uid);
db_query('DELETE FROM {sessions} WHERE uid = %d', $account->uid);
db_query('DELETE FROM {users_roles} WHERE uid = %d', $account->uid);
db_query('DELETE FROM {authmap} WHERE uid = %d', $account->uid);
drupal_set_message(t('The account has been deleted.'));
......
......@@ -1267,6 +1267,7 @@ function user_edit($category = 'account') {
else if (arg(2) == 'delete') {
if ($edit['confirm']) {
db_query('DELETE FROM {users} WHERE uid = %d', $account->uid);
db_query('DELETE FROM {sessions} WHERE uid = %d', $account->uid);
db_query('DELETE FROM {users_roles} WHERE uid = %d', $account->uid);
db_query('DELETE FROM {authmap} WHERE uid = %d', $account->uid);
drupal_set_message(t('The account has been deleted.'));
......
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