]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/User.php
Merge branch '0.9.x' into 1.0.x
[quix0rs-gnu-social.git] / classes / User.php
index f1ebe07b90337dc219bb56ebead5f31f11ec8b24..bec05f8cfcf5866ee72111bdda7457035a84c31d 100644 (file)
@@ -520,8 +520,8 @@ class User extends Memcached_DataObject
             common_log(LOG_WARNING,
                 sprintf(
                     "Profile ID %d (%s) tried to block his or herself.",
-                    $profile->id,
-                    $profile->nickname
+                    $this->id,
+                    $this->nickname
                 )
             );
             return false;
@@ -543,13 +543,7 @@ class User extends Memcached_DataObject
             return false;
         }
 
-        // Cancel their subscription, if it exists
-
-        $otherUser = User::staticGet('id', $other->id);
-
-        if (!empty($otherUser)) {
-            subs_unsubscribe_to($otherUser, $this->getProfile());
-        }
+        Subscription::cancel($other, $this->getProfile());
 
         $block->query('COMMIT');