Merge pull request from annando/1511-only-valid-contacts

Only show valid contacts on the group page
This commit is contained in:
Tobias Diekershoff 2015-11-08 16:46:45 +01:00
commit e6202defd1
2 changed files with 16 additions and 15 deletions

View file

@ -158,7 +158,9 @@ function group_get_members($gid) {
if(intval($gid)) {
$r = q("SELECT `group_member`.`contact-id`, `contact`.* FROM `group_member`
INNER JOIN `contact` ON `contact`.`id` = `group_member`.`contact-id`
WHERE `gid` = %d AND `group_member`.`uid` = %d ORDER BY `contact`.`name` ASC ",
WHERE `gid` = %d AND `group_member`.`uid` = %d AND
NOT `contact`.`self` AND NOT `contact`.`blocked` AND NOT `contact`.`pending`
ORDER BY `contact`.`name` ASC ",
intval($gid),
intval(local_user())
);

View file

@ -230,4 +230,3 @@ function group_content(&$a) {
return replace_macros($tpl, $context);
}