Suspended account that leaves the username still active in completions?

Related to

Best practices for deceased community members

since I suspended the deceased user (for security reasons), but apparently that also stops his username being auto-completed in the search field.

Since this user was our most prolific poster, this is far from ideal.

Is there any way to have the user suspended but also have his username still auto-complete in the search fields and elsewhere?

Also, “Deceased” should be an option for reason for Suspending a user.

Thanks.

1 Like

I think it’s actually the deactivated account that’s keeping the user from coming up in a search rather than a suspension. Try suspending the user, but activate him.

The suspension dialog allows for a custom reason:

You can also change the user’s email to some random address, like suspended123@no-email.invalid in case someone should try to reactivate it.

1 Like

The account currently shows as Activated.

Yes, and I used that, but Deceased should be a valid default option, and would allow more appropriate treatment of the account automatically.

Unfortunately, this change does not seem possible unless the email is verified - at least when I tried to make the change it immediately told me the user would have to respond to the email. So that would seem to imply it would have to be a valid email at least long enough to make the change.

1 Like

Are you on the latest version? Perhaps the new search changed this behavior, but on my Discourse which I haven’t updated to the latest version, a suspended and activated user does show up:

I’ll update to latest tomorrow and I’ll let you know if this behavior changes.

2 Likes

I’m on whatever is the latest release version. 2.7.8 ( 18b6f4ecf6 ).

Are you an admin? I believe the behaviour varies depending on if you are an admin (or some other privs) or a regular user. Admin users can still auto-complete the suspended user name, but regular users cannot (on my forum).

2 Likes

Yes, I’m an admin, but even when logged in as a basic user I can get the suspended+activated user to autopopulate in search.

This is on 2.8.0.beta6 (d3be77a0d1), so you’re a couple of releases behind.

I updated to latest - 2.8.0.beta6 (073e5ccd83) and the behavior is like you originally described it: the user autopopulates in search when suspended+active for an admin, but does not autopopulate for a basic user.

So then the question remains, is there a way to include the user in the autopopulation while leaving them suspended.

The user has to stay suspended, obviously, but the user also has thousands of posts that folks want to be able to search for his work easily since, as I mentioned, he was the single most prolific poster on the forum.

1 Like

Why not set their password to a 1-megabyte value from /dev/random?

In order to keep him unsuspended and activated, you could change his email in the rails console:

rails c
u = User.find_by_email('user@domain.com')
u.email = 'user@no-email.invalid'
u.save!

I’d really prefer a solution that did not abuse the password and email address to attempt to thwart access to the account. The account should be suspended/deactivated - it just also should be usable in the autocomplete.

Really, the autocomplete should include suspended accounts given their posts are not deleted and still searchable, so I don’t see why they would be excluded unless they are both suspended and have no posts.

3 Likes