schungx  
                
                  
                    September 25, 2017,  9:31am
                   
                  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 Likes 
            
            
           
          
            
            
              What do you think @zogstrip ?
             
            
              
            
           
          
            
              
                schungx  
              
                  
                    October 3, 2017, 10:22am
                   
                  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 Likes 
            
                
            
           
          
            
            
              @schungx 
Is this still accurate? I was trying to do this and keep getting: undefined method `update" for nil:NilClass
             
            
              
            
           
          
            
              
                schungx  
              
                  
                    November 7, 2017,  2:54pm
                   
                  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 Likes 
            
            
           
          
            
              
                schungx  
              
                  
                    May 12, 2018,  6:59pm
                   
                  7 
               
             
            
              Anyone in team gonna take a look at this?
             
            
              
            
           
          
            
              
                zogstrip  
              
                  
                    May 13, 2018,  3:00pm
                   
                  8 
               
             
            
            
              8 Likes 
            
            
           
          
            
              
                schungx  
              
                  
                    May 13, 2018,  9:47pm
                   
                  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  
              
                  
                    May 16, 2018,  9:28pm
                   
                  12 
               
             
            
              Just tried and it worked fine. Was your sidekiq queue full?
             
            
              2 Likes 
            
            
           
          
            
              
                schungx  
              
                  
                    May 22, 2018,  3:43pm
                   
                  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  
              
                  
                    May 22, 2018,  3:44pm
                   
                  14 
               
             
            
              
Have you checked the logs of your SMTP provider/API?
             
            
              
            
           
          
            
              
                schungx  
              
                  
                    May 22, 2018,  3:45pm
                   
                  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.