]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OMB/OMBPlugin.php
Tidying up getUser calls to profiles and some events
[quix0rs-gnu-social.git] / plugins / OMB / OMBPlugin.php
index e2552e8e0881be6b189de1d3b1d34402b25abe69..cd319d24c28725aebc41d6444127fff7cdcd1b26 100644 (file)
@@ -182,16 +182,16 @@ class OMBPlugin extends Plugin
     /**
      * Check for illegal subscription attempts
      *
-     * @param User    $user     subscriber
+     * @param Profile $profile  subscriber
      * @param Profile $other    subscribee
      * @return hook return value
      */
-    function onStartSubscribe($profile, $other)
+    function onStartSubscribe(Profile $profile, Profile $other)
     {
         // OMB 0.1 doesn't have a mechanism for local-server-
         // originated subscription.
 
-        $omb01 = Remote_profile::getKV('id', $other_id);
+        $omb01 = Remote_profile::getKV('id', $other->id);
 
         if (!empty($omb01)) {
             throw new ClientException(
@@ -257,14 +257,14 @@ class OMBPlugin extends Plugin
     /**
      * Remove old OMB subscription tokens
      *
-     * @param User    $user     subscriber
+     * @param Profile $profile  subscriber
      * @param Profile $other    subscribee
      * @return hook return value
      */
-    function onEndUnsubscribe($profile, $other)
+    function onEndUnsubscribe(Profile $profile, Profile $other)
     {
         $sub = Subscription::pkeyGet(
-            array('subscriber' => $subscriber->id, 'subscribed' => $other->id)
+            array('subscriber' => $profile->id, 'subscribed' => $other->id)
         );
 
         if (!empty($sub->token)) {