diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-07-12 23:08:07 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-07-12 23:08:07 -0700 |
commit | 7e16f8cdae597cc8329c3cc9ce769d512ba84085 (patch) | |
tree | cf16a878c11fefc2e60950792cc028016cc0a8d0 /include | |
parent | a4dbd6657ca48131731da050c5378be8c84eda0e (diff) | |
download | volse-hubzilla-7e16f8cdae597cc8329c3cc9ce769d512ba84085.tar.gz volse-hubzilla-7e16f8cdae597cc8329c3cc9ce769d512ba84085.tar.bz2 volse-hubzilla-7e16f8cdae597cc8329c3cc9ce769d512ba84085.zip |
groups and acls
Diffstat (limited to 'include')
-rw-r--r-- | include/group.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/group.php b/include/group.php index 585b2eab9..1f48cdd56 100644 --- a/include/group.php +++ b/include/group.php @@ -2,7 +2,7 @@ function group_add($uid,$name) { -dbg(2); + $ret = false; if(x($uid) && x($name)) { $r = group_byname($uid,$name); // check for dups @@ -104,6 +104,21 @@ function group_add_member($uid,$name,$member) { return $r; } +function group_get_members($gid) { + $ret = array(); + if(intval($gid)) { + $r = q("SELECT `group_member`.`contact-id`, `contact`.* FROM `group_member` + LEFT JOIN `contact` ON `contact`.`id` = `group_member`.`contact-id` + WHERE `gid` = %d AND `group_member`.`uid` = %d", + intval($gid), + intval($_SESSION['uid']) + ); + if(count($r)) + $ret = $r; + } + return $ret; +} + function group_side() { |