summaryrefslogtreecommitdiff
path: root/classes/User.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-01-21 02:22:10 -0500
committerEvan Prodromou <evan@controlyourself.ca>2009-01-21 02:22:10 -0500
commit26652e92f2ef0cedda9823e17c81fc78be82fe9b (patch)
tree06cda4f98d37dac0824e96f98f727f25ce3146da /classes/User.php
parent97f14ef1f9c9a1151c149eb1e95646081918befb (diff)
First pass at a group home page
This is the first pass at a group home page.
Diffstat (limited to 'classes/User.php')
-rw-r--r--classes/User.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/classes/User.php b/classes/User.php
index 92ff8776b..51e23fccf 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -492,4 +492,32 @@ class User extends Memcached_DataObject
return true;
}
+ function isMember($group)
+ {
+ $mem = new Group_member();
+
+ $mem->group_id = $group->id;
+ $mem->profile_id = $this->id;
+
+ if ($mem->find()) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ function isAdmin($group)
+ {
+ $mem = new Group_member();
+
+ $mem->group_id = $group->id;
+ $mem->profile_id = $this->id;
+ $mem->is_admin = 1;
+
+ if ($mem->find()) {
+ return true;
+ } else {
+ return false;
+ }
+ }
}