summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-28 10:42:31 -0800
committerEvan Prodromou <evan@status.net>2009-12-28 10:42:31 -0800
commitc07f22104094d26f7f6266c2b59f7999030fda1a (patch)
treebd9ff09a3f00a005ae44c968d04f8260127bd9c9 /classes
parenta80fa178726da3ff6d06272bd06f35afbfe2f757 (diff)
check if other user exists before unsub
Diffstat (limited to 'classes')
-rw-r--r--classes/User.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/User.php b/classes/User.php
index 484dc8c82..6708d95b6 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -625,7 +625,11 @@ class User extends Memcached_DataObject
// Cancel their subscription, if it exists
- subs_unsubscribe_to($other->getUser(),$this->getProfile());
+ $otherUser = User::staticGet('id', $other->id);
+
+ if (!empty($otherUser)) {
+ subs_unsubscribe_to($otherUser, $this->getProfile());
+ }
$block->query('COMMIT');