mirror of
https://github.com/neocities/neocities.git
synced 2025-08-05 09:11:28 +02:00
initial browsing page
This commit is contained in:
parent
b057ecc7a1
commit
d0a359283e
4 changed files with 21 additions and 8 deletions
|
@ -73,9 +73,12 @@ class Site < Sequel::Model
|
|||
end
|
||||
|
||||
# Check for existing user
|
||||
user = self.class.select(:username).filter(username: values[:username]).first
|
||||
if !user.nil? && (user.id != values[:id])
|
||||
errors.add :username, 'This username is already taken. Try using another one.'
|
||||
|
||||
if new?
|
||||
user = self.class.select(:username).filter(username: values[:username]).first
|
||||
if !user.nil? && (user.id != values[:id])
|
||||
errors.add :username, 'This username is already taken. Try using another one.'
|
||||
end
|
||||
end
|
||||
|
||||
if values[:password].nil? || (@password_length && @password_length < MINIMUM_PASSWORD_LENGTH)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue