diff options
author | Friendika <info@friendika.com> | 2011-05-31 19:24:26 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-05-31 19:24:26 -0700 |
commit | b8c4d73377d93cc54cb10fd1c3fac173c8f57627 (patch) | |
tree | 80272eff0a99a399ccd9bc82f0b3999e5a99bd72 /include/group.php | |
parent | e25ded6d9611e4bada5474b7c7d7c96ad95c930e (diff) | |
download | volse-hubzilla-b8c4d73377d93cc54cb10fd1c3fac173c8f57627.tar.gz volse-hubzilla-b8c4d73377d93cc54cb10fd1c3fac173c8f57627.tar.bz2 volse-hubzilla-b8c4d73377d93cc54cb10fd1c3fac173c8f57627.zip |
show group affiliations in contact editor
Diffstat (limited to 'include/group.php')
-rw-r--r-- | include/group.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/group.php b/include/group.php index d1b336946..804d0c58f 100644 --- a/include/group.php +++ b/include/group.php @@ -185,3 +185,15 @@ function expand_groups($a) { $ret[] = $rr['contact-id']; return $ret; } + + +function member_of($c) { + + $r = q("SELECT `group`.`name`, `group`.`id` FROM `group` LEFT JOIN `group_member` ON `group_member`.`gid` = `group`.`id` WHERE `group_member`.`contact-id` = %d AND `group`.`deleted` = 0 ORDER BY `group`.`name` ASC ", + intval($c) + ); + + return $r; + +} + |