mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 08:26:18 +08:00
14 lines
316 B
Ruby
14 lines
316 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class UserPasswordExpirer
|
||
|
def self.expire_user_password(user)
|
||
|
UserPassword.create!(
|
||
|
user:,
|
||
|
password_hash: user.password_hash,
|
||
|
password_salt: user.salt,
|
||
|
password_algorithm: user.password_algorithm,
|
||
|
password_expired_at: Time.zone.now,
|
||
|
)
|
||
|
end
|
||
|
end
|