mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
downcase usernames
This commit is contained in:
parent
3c665f6082
commit
7c9f1511bf
1 changed files with 8 additions and 4 deletions
|
@ -24,6 +24,10 @@ class Site < Sequel::Model
|
|||
end
|
||||
end
|
||||
|
||||
def username=(val)
|
||||
super val.downcase
|
||||
end
|
||||
|
||||
def valid_password?(plaintext)
|
||||
BCrypt::Password.new(values[:password]) == plaintext
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue