1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to view banned members in forum

Discussion in 'Troubleshooting and Problems' started by Phillip, Feb 4, 2013.

  1. Phillip

    Phillip Active Member

    What is the best way to give mods the ability to see that members have banned without control panel access? Is there a reliable add-on that will let mods see on the forum (like user pages, member cards, etc.) if a member has banned?

    It appears that the only way to view banned info by default is through the admin control panel. I'd like to adjust this so that mods can view whether a member has been banned or not on the forum itself.
  2. Mouth

    Mouth Well-Known Member

    Set a high styling priority for your Banned Users usergroup, and then configure User Title or User Name CSS for that usergroup.
    caliman and Jake Bunce like this.
  3. Phillip

    Phillip Active Member

    Thank you for the help. If it's not too much trouble, can you please post step-by-step instructions on how to do this?
  4. Russ

    Russ Well-Known Member

    Click Users - > List User Groups -> Banned

    Display Styling Priority:
    User Title Override:
    User Name CSS:
    color: #ea1600;
    font-weight: bold;
    Jake Bunce likes this.
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Here is one option:


    That template edit affects avatars in posts.

    Mouth is talking about setting a user title. You would have to create a new group for banned users and then specify it as the banned group:

    Admin CP -> Home -> Options -> User Discouragement and Discipline -> Add User Group on Ban

    Then set an appropriate user title and high display priority (higher than other groups) for the banned group:

    Admin CP -> Users -> List User Groups -> [click the group]
    > Display Styling Priority
    > User Title Override
    Mouth likes this.
  6. 1l1

    1l1 Member

    Is there any way to let registered users view banned profiles? If I check "Bypass user privacy: Allow" for this group it also makes possible for them to view invisible members online.
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member


    Remove (or comment) the red code:

    	public function canViewFullUserProfile(array $user, &$errorPhraseKey = '', array $viewingUser = null)
    		if ($viewingUser['user_id'] == $user['user_id'])
    			return true; // always let a user view their own profile
    		if (!XenForo_Permission::hasPermission($viewingUser['permissions'], 'general', 'viewProfile'))
    			return false;
    		$userModel = $this->_getUserModel();
    		if (!$userModel->passesPrivacyCheck($user['allow_view_profile'], $user, $viewingUser))
    			$errorPhraseKey = 'member_limits_viewing_profile';
    			return false;
    			// TODO: we should do a limited profile at some point
    		// don't display the profiles of unconfirmed users
    		if ($user['user_state'] != 'valid' & $user['user_state'] != 'email_confirm_edit' && !$userModel->canByPassUserPrivacy($user['user_id']))
    			$errorPhraseKey = 'this_users_profile_is_not_available';
    			return false;
    		// user profiles of permanently-banned users should be unavailable to all but privacy-bypassing users
    		if ($user['is_banned'])
    			$ban = $this->getModelFromCache('XenForo_Model_Banning')->getBannedUserById($user['user_id']);
    			if ($ban && $ban['end_date'] == 0 && !$userModel->canBypassUserPrivacy($null, $viewingUser))
    				$errorPhraseKey = 'this_users_profile_is_not_available';
    				return false;
    		return true;
    That will make it so banned user profiles are viewable to all (who have permission to view profiles).

    This can be made into an addon by extending XenForo_Model_UserProfile.

Share This Page