mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def username=(val)
|
||||||
|
super val.downcase
|
||||||
|
end
|
||||||
|
|
||||||
def valid_password?(plaintext)
|
def valid_password?(plaintext)
|
||||||
BCrypt::Password.new(values[:password]) == plaintext
|
BCrypt::Password.new(values[:password]) == plaintext
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue