]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/deluserqueuehandler.php
catch UserNoProfileException and continue
[quix0rs-gnu-social.git] / lib / deluserqueuehandler.php
index 4a1233a5efa2513fb4b6313a147fa6ad95868722..710303938264995a8e77678d8ad3b0cc44b54540 100644 (file)
@@ -49,9 +49,13 @@ class DelUserQueueHandler extends QueueHandler
             return true;
         }
 
-        if (!$user->hasRole(Profile_role::DELETED)) {
-            common_log(LOG_INFO, "User {$user->nickname} is not pending deletion; aborting.");
-            return true;
+        try {
+            if (!$user->hasRole(Profile_role::DELETED)) {
+                common_log(LOG_INFO, "User {$user->nickname} is not pending deletion; aborting.");
+                return true;
+            }
+        } catch (UserNoProfileException $unp) {
+            common_log(LOG_INFO, "Deleting user {$user->nickname} with no profile... probably a good idea!");
         }
 
         $notice = $this->getNextBatch($user);