Browse Source

Remove redirection from User::remove

pull/6198/head
Hypolite Petovan 2 years ago
parent
commit
54f4ac6ae0
2 changed files with 6 additions and 6 deletions
  1. +4
    -0
      mod/removeme.php
  2. +2
    -6
      src/Model/User.php

+ 4
- 0
mod/removeme.php View File

@ -59,6 +59,10 @@ function removeme_post(App $a)
if (User::getIdFromPasswordAuthentication($a->user, trim($_POST['qxz_password']))) {
User::remove($a->user['uid']);
unset($_SESSION['authenticated']);
unset($_SESSION['uid']);
$a->internalRedirect();
// NOTREACHED
}
}


+ 2
- 6
src/Model/User.php View File

@ -783,7 +783,7 @@ class User
public static function remove($uid)
{
if (!$uid) {
return;
return false;
}
$a = get_app();
@ -809,11 +809,7 @@ class User
// Remove the user relevant data
Worker::add(PRIORITY_LOW, 'RemoveUser', $uid);
if ($uid == local_user()) {
unset($_SESSION['authenticated']);
unset($_SESSION['uid']);
$a->internalRedirect();
}
return true;
}
/**


Loading…
Cancel
Save