aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-13 02:00:53 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-13 02:00:53 -0700
commitc6267a2cd2e3a731f44df9288ced508ad90c4ca3 (patch)
tree0558c6669ead159b855e9bd8e63bb24cc8da42f3 /include
parent7e16f8cdae597cc8329c3cc9ce769d512ba84085 (diff)
downloadvolse-hubzilla-c6267a2cd2e3a731f44df9288ced508ad90c4ca3.tar.gz
volse-hubzilla-c6267a2cd2e3a731f44df9288ced508ad90c4ca3.tar.bz2
volse-hubzilla-c6267a2cd2e3a731f44df9288ced508ad90c4ca3.zip
turn groups back into numbers
Diffstat (limited to 'include')
-rw-r--r--include/auth.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/include/auth.php b/include/auth.php
index 973aabe65..5e454745e 100644
--- a/include/auth.php
+++ b/include/auth.php
@@ -71,23 +71,21 @@ else {
}
}
-// Returns an array of group names this contact is a member of.
-// Since contact-id's are unique and each "belongs" to a given user uid,
-// this array will only contain group names related to the uid of this
+// Returns an array of group id's this contact is a member of.
+// This array will only contain group id's related to the uid of this
// DFRN contact. They are *not* neccessarily unique across the entire site.
if(! function_exists('init_groups_visitor')) {
function init_groups_visitor($contact_id) {
$groups = array();
- $r = q("SELECT `group_member`.`gid`, `group`.`name`
- FROM `group_member` LEFT JOIN `group` ON `group_member`.`gid` = `group`.`id`
- WHERE `group_member`.`contact-id` = %d ",
+ $r = q("SELECT `gid` FROM `group_member`
+ WHERE `contact-id` = %d ",
intval($contact_id)
);
if(count($r)) {
foreach($r as $rr)
- $groups[] = $rr['name'];
+ $groups[] = $rr['gid'];
}
return $groups;
}}