We have a membership site setup whereby expired users get auto-suspended via an API call. Is there a way for suspended users to not be visible in the user directory?
We don’t want to delete users or anonymize them as this would end up orphaning a lot of posts over time. We’d really like to keep user profile data associated with posts visible so that future users can still see who made a post (rather than just seeing “anon” users).
So is it possible to remove suspended users from the user directory and still keep their user profiles intact when viewed alongside their posts?
There’s a user setting Hide my public profile and presence features which will remove users from the directory. If you make setting this part of the deactivation process their profile cards will be hidden and they won’t appear in the user directory.
Thanks Steven, maybe we could add a query parameter similar to the logout parameter below that would enable or disable Hide my public profile and presence features when a user gets suspended or unsuspended…
I don’t believe suspended users appear in the user directory.
There is a setting that would allow them to be findable in the search (enable listing suspended users on search), but even with that enabled I don’t think they appear in the user directory.
I think they also have their user cards hidden as well if suspended, even without that user preference.
Let me suspend one of my most troublesome test users and check.
Edit: Note for future travellers who land on this by search - I actually got this muddled with ‘deactivating’ them as well so read further down.
This would then remove them from the user directory, even without searching (as soon as the background job runs. Every hour for the daily view, once a day for the other older ones)
And this is also what gives the simplified user card I was thinking of:
Thanks Jammy! Correct me if I’m wrong but you’re saying that accounts that are suspended will not show when searched for in the user directory, but they must also be deactivated to never display at all?
The jives with what I’m seeing… I can’t find suspended users when I search for them, but they will still display from within the main user directory page.
We used the API protocol to suspend users that expire as members within our WP instance, and it looks like we could add a function to “deactivate” and “activate” in much the same way as we did to “suspend” and “unsuspend.”
That’s currently how it’s set up. I think it is a little unusual that they appear in the big list even though they can’t be searched for, so it may be worth a ux topic to see if that can be tweaked if you did want to go that route.
I think this is how a few sites handle off-boarding paid members (and/or employees), so I think it’s worth a test run to see how you like it.