aboutsummaryrefslogtreecommitdiffstats
path: root/include/group.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-12 23:08:07 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-12 23:08:07 -0700
commit7e16f8cdae597cc8329c3cc9ce769d512ba84085 (patch)
treecf16a878c11fefc2e60950792cc028016cc0a8d0 /include/group.php
parenta4dbd6657ca48131731da050c5378be8c84eda0e (diff)
downloadvolse-hubzilla-7e16f8cdae597cc8329c3cc9ce769d512ba84085.tar.gz
volse-hubzilla-7e16f8cdae597cc8329c3cc9ce769d512ba84085.tar.bz2
volse-hubzilla-7e16f8cdae597cc8329c3cc9ce769d512ba84085.zip
groups and acls
Diffstat (limited to 'include/group.php')
-rw-r--r--include/group.php17
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() {