You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updating users.email will update the uid.
Is this correct behavior?
The expected behavior is that user.update (email: "xxxxx") does not update uid and email.
We expect these to be updated when we complete the change from the token given in the authentication email.
rails console
$ user = User.find(1)
$ user.update(email: "hoge@example.com")
User Update (0.5ms) UPDATE `users` SET `users`.`uid` = 'hoge@example.com', `users`.`confirmation_token` = 'xxxxxxxxxxxxxx', `users`.`confirmation_sent_at` = '2020-01-16 08:55:22', `users`.`unconfirmed_email` = 'hoge@example.com
', `users`.`updated_at` = '2020-01-16 08:55:22' WHERE `users`.`id` = 1
app/models/user.rb
# frozen_string_literal: true
class User < ActiveRecord::Base
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :confirmable
include DeviseTokenAuth::Concerns::User
def postpone_email_change?
true
end
end
devise_token_auth gem version : 1.1.3
devise gem version : 4.7.1
ruby version : 2.6.5
rails version : 6.0.2.1
The text was updated successfully, but these errors were encountered:
Updating users.email will update the uid.
Is this correct behavior?
The expected behavior is that user.update (email: "xxxxx") does not update uid and email.
We expect these to be updated when we complete the change from the token given in the authentication email.
rails console
app/models/user.rb
devise_token_auth gem version : 1.1.3
devise gem version : 4.7.1
ruby version : 2.6.5
rails version : 6.0.2.1
The text was updated successfully, but these errors were encountered: