mirror of
https://github.com/discourse/discourse.git
synced 2024-12-21 16:14:01 +08:00
32e261ef73
* Add migrations to ensure password hash is synced across users & user_passwords * Persist password-related data in user_passwords instead of users * Merge User#expire_old_email_tokens with User#expire_tokens_if_password_changed * Add post deploy migration to mark password-related columns from users table as read-only * Refactored UserPassword#confirm_password? and changes required to accommodate hashing the password after validations
8 lines
173 B
Ruby
8 lines
173 B
Ruby
# frozen_string_literal: true
|
|
|
|
class UserPasswordExpirer
|
|
def self.expire_user_password(user)
|
|
user.user_password&.update!(password_expired_at: Time.zone.now)
|
|
end
|
|
end
|