]> git.mxchange.org Git - friendica.git/commitdiff
Remove redirection from User::remove
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 25 Nov 2018 01:58:41 +0000 (20:58 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 25 Nov 2018 01:58:41 +0000 (20:58 -0500)
mod/removeme.php
src/Model/User.php

index 2f0eb2d37e7f5797585a93379fe159913bd637cb..ee0b66db8a3f282703eb52f415ae7518a341a513 100644 (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
        }
 }
index 43227a86da8fb51d142d45be137948e4b493914a..d162b27b6acb59c9434950ad312f2d1b691ae419 100644 (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;
        }
 
        /**