mirror of
https://github.com/neocities/neocities.git
synced 2025-07-23 19:10:40 +02:00
add settings page
This commit is contained in:
parent
b0f3d40bda
commit
5eb85e28f3
5 changed files with 131 additions and 6 deletions
|
@ -77,12 +77,13 @@ class Site < Sequel::Model
|
|||
errors.add :over_capacity, 'We are currently at capacity, and cannot create your home page. We will fix this shortly. Please come back later and try again, our apologies.'
|
||||
end
|
||||
|
||||
if new? && (values[:username].nil? || values[:username].empty? || values[:username].match(BAD_USERNAME_REGEX)) # || USERNAME_SHITLIST.include?(values[:username])
|
||||
if values[:username].nil? || values[:username].empty? || values[:username].match(BAD_USERNAME_REGEX)
|
||||
errors.add :username, 'A valid username is required.'
|
||||
end
|
||||
|
||||
# Check for existing user
|
||||
|
||||
|
||||
user = self.class.select(:id, :username).filter(username: values[:username]).first
|
||||
|
||||
if user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue