XF 1.4 Make banned members profiles viewable

imthebest

Well-known member
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?
 
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:

PHP:
// 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;
    }
}

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).
 
Top Bottom