1
0
Fork 0

Merge pull request #5256 from miqrogroove/patch-1

Filter Removed Users From Directory
This commit is contained in:
Hypolite Petovan 2018-06-20 12:07:26 -04:00 committed by GitHub
commit 9feb5fb0f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,7 +83,7 @@ function directory_content(App $a)
$cnt = dba::fetch_first("SELECT COUNT(*) AS `total` FROM `profile`
LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`
WHERE `is-default` $publish AND NOT `user`.`blocked` $sql_extra");
WHERE `is-default` $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` $sql_extra");
if (DBM::is_result($cnt)) {
$a->set_pager_total($cnt['total']);
}
@ -96,7 +96,8 @@ function directory_content(App $a)
`contact`.`addr`, `contact`.`url` AS profile_url FROM `profile`
LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`
LEFT JOIN `contact` ON `contact`.`uid` = `user`.`uid`
WHERE `is-default` $publish AND `user`.`blocked` = 0 AND `contact`.`self` $sql_extra $order LIMIT ".$limit
WHERE `is-default` $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` AND `contact`.`self`
$sql_extra $order LIMIT $limit"
);
if (DBM::is_result($r)) {
if (in_array('small', $a->argv)) {