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

XF 1.4 Make banned members profiles viewable

Discussion in 'XenForo Questions and Support' started by imthebest, Sep 5, 2014.

  1. imthebest

    imthebest Formerly Super120

    By default banned members profiles are not viewable but anyone unless the usergroup has the bypass privacy permission. How can I change that behavior so the profiles of banned members will be still viewable to anyone?
  2. Chris D

    Chris D XenForo Developer Staff Member

    Ideally you should look at having an add-on that will do this. As far as I know, one doesn't exist at the moment.

    However, there is this code edit. library/XenForo/Model/UserProfile.php :: canViewFullUserProfile:

    // 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'] == && !$userModel->canBypassUserPrivacy($null$viewingUser))
    $errorPhraseKey 'this_users_profile_is_not_available';
    If you remove that entire block of code, permanently banned users profiles will still be visible (subject to the other conditions/privacy checks in that function).
  3. imthebest

    imthebest Formerly Super120

Share This Page