schungx
(Stephen Chung)
25. September 2017 um 09:31
1
This is similar to:
I have a user whose account was originally created as a staged account via an import from another system.
Recently, they logged in and created a new topic.
But they still show up as a staged user, and I cannot @mention them.
I do not see any way in the Admin UI to force them to become “unstaged”.
Potentially relevant site settings:
Google Login enabled
Local logins disabled
Email whitelist domains (1)
Currently running version v1.5.0.beta13b +38 (67a5fc39ded9f661974b6e06b109c75b50d3a1b1)
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.
3 „Gefällt mir“
What do you think @zogstrip ?
schungx
(Stephen Chung)
3. Oktober 2017 um 10:22
4
Just in case other people needs to manually unstage a user:
Step 0: SSH to your VM
ssh my.discourse.domain.com
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("email@address.com").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.
13 „Gefällt mir“
@schungx
Is this still accurate? I was trying to do this and keep getting: undefined method `update" for nil:NilClass
schungx
(Stephen Chung)
7. November 2017 um 14:54
6
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
.
3 „Gefällt mir“
schungx
(Stephen Chung)
12. Mai 2018 um 18:59
7
Anyone in team gonna take a look at this?
It seems to be still not fixed.
zogstrip
(Régis Hanol)
13. Mai 2018 um 15:00
8
8 „Gefällt mir“
schungx
(Stephen Chung)
13. Mai 2018 um 21:47
9
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.
zogstrip
(Régis Hanol)
16. Mai 2018 um 21:28
12
Just tried and it worked fine. Was your sidekiq queue full?
2 „Gefällt mir“
schungx
(Stephen Chung)
22. Mai 2018 um 15:43
13
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.
zogstrip
(Régis Hanol)
22. Mai 2018 um 15:44
14
Have you checked the logs of your SMTP provider/API?
schungx
(Stephen Chung)
22. Mai 2018 um 15:45
15
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.