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

Xon

Well-known member
Affected version
2.1.3
If \XF\Entity\User::canIgnoreUser returns false, but the user is ignored; that user can not be taken off a user's ignore list.
 
Are you sure? The \XF\Pub\Controller\Member::actionIgnore checks whether the user is currently being ignored before checking the canIgnoreUser method.
 
The unignore button is only rendered if canIgnoreUser returns true, that is templating removes the display option
 
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 🤔
 
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
 
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 Bottom