summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/User.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/classes/User.php b/classes/User.php
index 4ed6003dc..8234e0784 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -21,4 +21,16 @@ class User extends DB_DataObject
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
+
+ function getProfile() {
+ return Profile::staticGet($this->$id);
+ }
+
+ function isSubscribed($other) {
+ assert(!is_null($other));
+ $sub = DB_DataObject::factory('subscription');
+ $sub->subscriber = $this->id;
+ $sub->subscribed = $other->id;
+ return $sub->find();
+ }
}