diff --git a/htdocs/profile.bml b/htdocs/profile.bml index bb3ff633e7..a86ab5fb84 100644 --- a/htdocs/profile.bml +++ b/htdocs/profile.bml @@ -742,6 +742,18 @@ body<= @posting_access_to_userids, @posting_access_from_userids, ); + # pull in list of banned users + my $banned = LJ::load_rel_user($u, 'B') || []; + my %banned_users = map { $_ => 1 } @$banned; + + # remove banned users from lists to display + @$_ = grep { !exists $banned_users{ $_ }, @$_ } + foreach ( \@trusted_userids, \@watched_userids, \@trusted_by_userids, \@watched_by_userids, + \@mutually_trusted_userids, \@mutually_watched_userids, \@mutually_watched_userids, + \@not_mutually_trusted_userids, \@not_mutually_watched_userids, + \@not_mutually_trusted_by_userids, \@not_mutually_watched_by_userids, \@members_userids, + \@member_of_userids, \@admin_of_userids, \@posting_access_to_userids, \@posting_access_from_userids ); + # presort various userid arrays @$_ = sort { $us->{$a}->display_name cmp $us->{$b}->display_name } @$_ foreach ( \@trusted_userids, \@watched_userids, \@trusted_by_userids, \@watched_by_userids,