]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/User.php
Infinite loop on CLI initiated profile deletion for local users
[quix0rs-gnu-social.git] / classes / User.php
index 5b9d7b51fec351924d196f882465ca785fed683c..e33c83e89cf0f74f3c07957a4caec50e94f84624 100644 (file)
@@ -598,8 +598,10 @@ class User extends Managed_DataObject
         }
 
         try {
-            $profile = $this->getProfile();
-            $profile->delete();
+            if (!$this->hasRole(Profile_role::DELETED)) {
+                $profile = $this->getProfile();
+                $profile->delete();
+            }
         } catch (UserNoProfileException $unp) {
             common_log(LOG_INFO, "User {$this->nickname} has no profile; continuing deletion.");
         }