mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: ensure staged accounts are always inactive
If for any reason active is stored in the user model, clear it out prior to creating an account
This commit is contained in:
@ -321,6 +321,7 @@ class UsersController < ApplicationController
|
||||
if user = User.where(staged: true).with_email(params[:email].strip.downcase).first
|
||||
user_params.each { |k, v| user.send("#{k}=", v) }
|
||||
user.staged = false
|
||||
user.active = false
|
||||
else
|
||||
user = User.new(user_params)
|
||||
end
|
||||
|
Reference in New Issue
Block a user