Include both copies of the password in the saved user
This allows is to go back to hashing passwords when the user is saved. Fixes #4474
This commit is contained in:
parent
1fd10c0935
commit
242a4a1aee
2 changed files with 2 additions and 3 deletions
|
@ -104,11 +104,11 @@ class UsersController < ApplicationController
|
|||
render :action => "new"
|
||||
elsif current_user.auth_provider.present?
|
||||
# Verify external authenticator before moving on
|
||||
session[:new_user] = current_user.attributes.slice("email", "display_name", "pass_crypt")
|
||||
session[:new_user] = current_user.slice("email", "display_name", "pass_crypt", "pass_crypt_confirmation")
|
||||
redirect_to auth_url(current_user.auth_provider, current_user.auth_uid), :status => :temporary_redirect
|
||||
else
|
||||
# Save the user record
|
||||
session[:new_user] = current_user.attributes.slice("email", "display_name", "pass_crypt")
|
||||
session[:new_user] = current_user.slice("email", "display_name", "pass_crypt", "pass_crypt_confirmation")
|
||||
redirect_to :action => :terms
|
||||
end
|
||||
end
|
||||
|
|
|
@ -119,7 +119,6 @@ class User < ApplicationRecord
|
|||
|
||||
alias_attribute :created_at, :creation_time
|
||||
|
||||
after_initialize :encrypt_password
|
||||
before_save :encrypt_password
|
||||
before_save :update_tile
|
||||
after_save :spam_check
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue