Staged users remain staged even after activation and must be manually unstaged

This is similar to:

except that when a user is staged, meaning that it came in via email in, and after their account is activated (either by the admin or by sending out an activation email which they reacted to), they can log into the system and do things like a regular user.

Except that they user account stays staged. There is no way to clear the staged flag.

So, user needs to be automatically unstaged not only when loggin in via OAuth, but simply when they are activated via any means.


What do you think @zogstrip?

Just in case other people needs to manually unstage a user:

Step 0: SSH to your VM


Step 1: Enter the discourse container

cd /var/discourse
sudo ./launcher enter app

Step 2: Enter the Rails console

rails c

Step 3, Option 1: Unstage the user by email address

User.find_by_email("").update(staged: false)

Step 3, Option 2: Unstage the user by username

User.where(username: "username").update_all(staged: false)

Step 4: Finito, get out

Press ^D a few times to get back out.



Is this still accurate? I was trying to do this and keep getting: undefined method `update" for nil:NilClass

AFAIK this is still true.

If you got a nil error on update, then it is likely that you mis-typed the email address. User.find_by_email didn’t find it and so returned nil.


Anyone in team gonna take a look at this?
It seems to be still not fixed.

We’ll now always unstage user when they log in :banana:


Great. This is a great help.

There is one more issue. For staged uses, pressing the Send Activation Email button doesn’t send the email. The email logs show that the signup email has been sent, but the email is actually not sent.

I wonder if it is filtered out somewhere.

Just tried and it worked fine. Was your sidekiq queue full?


Not really… It is just that the email is not sent, but it says sent in under Email->Sent.

Sidekiq not full.

The only way I get to invite staged people right now is 1) Activate them by hand, 2) Press Send Password Reset email.

Have you checked the logs of your SMTP provider/API?

I’ll go do some more digging around after I upgrade to the latest and greatest.

It is strange that the Password Reset email got sent IMMEDIATELY, while the activation emails don’t ever get sent/received.