]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
catch UserNoProfileException and continue
authorEvan Prodromou <evan@status.net>
Sat, 10 Apr 2010 15:36:23 +0000 (11:36 -0400)
committerEvan Prodromou <evan@status.net>
Sat, 10 Apr 2010 15:36:23 +0000 (11:36 -0400)
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);