if (User::getIdFromPasswordAuthentication($a->user, trim($_POST['qxz_password']))) {
User::remove($a->user['uid']);
+
+ unset($_SESSION['authenticated']);
+ unset($_SESSION['uid']);
+ $a->internalRedirect();
// NOTREACHED
}
}
public static function remove($uid)
{
if (!$uid) {
- return;
+ return false;
}
$a = get_app();
// 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;
}
/**