mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-13 02:44:22 +01:00
Added User.uses_deprecated_password? method
This commit is contained in:
parent
34e0573fc4
commit
8e23d11054
2 changed files with 18 additions and 0 deletions
|
|
@ -211,6 +211,11 @@ class User < ActiveRecord::Base
|
|||
save(false)
|
||||
end
|
||||
|
||||
# Returns true if the user has a password hashed using SHA-1.
|
||||
def uses_deprecated_password?
|
||||
crypted_password =~ /^[a-f0-9]{40}$/i
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def self.salted(s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue