How do I allow members to ignore moderators/administrators?

CTXMedia

Well-known member
Since there are no ignore system settings can anyone advise on how I would be able to allow my members to ignore moderators and/or administrators?

Thanks,
Shaun :D
 
XenForo_Model_UserIgnore::canIgnoreUser and remove/comment out

if ($user['is_moderator'] || $user['is_admin'])
{
if ($setError)
{
$error = new XenForo_Phrase('staff_members_may_not_be_ignored');
}
return false;
}
 
XenForo_Model_UserIgnore::canIgnoreUser and remove/comment out

if ($user['is_moderator'] || $user['is_admin'])
{
if ($setError)
{
$error = new XenForo_Phrase('staff_members_may_not_be_ignored');
}
return false;
}

Just a though - can I modify that first line so that you can ignore everyone except the Admin/Owner user account? (In my case, User ID: 1)

Cheers,
Shaun :D
 
Just a though - can I modify that first line so that you can ignore everyone except the Admin/Owner user account? (In my case, User ID: 1)

Cheers,
Shaun :D
PHP:
class Ragtek_TeamIgnore_Model_UserIgnore extends XFCP_Ragtek_TeamIgnore_Model_UserIgnore
{
public function canIgnoreUser($userId, array $user, &$error = '')
{
 
$return = parent::canIgnoreUser($userId, $user, $error);
if ($return == false AND $error == new XenForo_Phrase('staff_members_may_not_be_ignored') AND $user['user_id'] != 1)
{
return true;
}
return $return;
}
}
 
Top Bottom