Only show valid contacts on the group side

This commit is contained in:
Michael Vogel 2015-11-08 16:41:00 +01:00
parent d9e56e0450
commit 1c5eaa646c
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);
}