Fixed When canIgnoreUser returns false, a user can't be unignored

Affected version
2.1.3

Xon

Well-known member
If \XF\Entity\User::canIgnoreUser returns false, but the user is ignored; that user can not be taken off a user's ignore list.
 

Liam W

in memoriam 1998-2020
Are you sure? The \XF\Pub\Controller\Member::actionIgnore checks whether the user is currently being ignored before checking the canIgnoreUser method.
 

Xon

Well-known member
The unignore button is only rendered if canIgnoreUser returns true, that is templating removes the display option
 

Chris D

XenForo developer
Staff member
Yeah I think the logic is wrong here. I think in XF 1.5 it's if is ignored / show unignore button / else if can ignore / show ignore button clearly in a mood today where writing pseudo-code is more palatable than writing real code 🤔
 

Xon

Well-known member
My workaround for my live site is to just do isIgnoring || canIgnoreUser and just let them tank the "you can't ignore" error message if they unignore someone then try to ignore them again. Quick too :p
 

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.4).

Change log:
Show the 'unignore' button for users that can no longer be ignored
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Top