Remove redirection from User::remove
This commit is contained in:
parent
0dd120bb06
commit
54f4ac6ae0
|
@ -59,6 +59,10 @@ function removeme_post(App $a)
|
||||||
|
|
||||||
if (User::getIdFromPasswordAuthentication($a->user, trim($_POST['qxz_password']))) {
|
if (User::getIdFromPasswordAuthentication($a->user, trim($_POST['qxz_password']))) {
|
||||||
User::remove($a->user['uid']);
|
User::remove($a->user['uid']);
|
||||||
|
|
||||||
|
unset($_SESSION['authenticated']);
|
||||||
|
unset($_SESSION['uid']);
|
||||||
|
$a->internalRedirect();
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -783,7 +783,7 @@ class User
|
||||||
public static function remove($uid)
|
public static function remove($uid)
|
||||||
{
|
{
|
||||||
if (!$uid) {
|
if (!$uid) {
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
@ -809,11 +809,7 @@ class User
|
||||||
// Remove the user relevant data
|
// Remove the user relevant data
|
||||||
Worker::add(PRIORITY_LOW, 'RemoveUser', $uid);
|
Worker::add(PRIORITY_LOW, 'RemoveUser', $uid);
|
||||||
|
|
||||||
if ($uid == local_user()) {
|
return true;
|
||||||
unset($_SESSION['authenticated']);
|
|
||||||
unset($_SESSION['uid']);
|
|
||||||
$a->internalRedirect();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user