mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
check for empty username/email for identifier
This commit is contained in:
parent
4ffeddaf5a
commit
e551aeb342
1 changed files with 1 additions and 0 deletions
|
@ -317,6 +317,7 @@ class Site < Sequel::Model
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_with_identifier(username_or_email)
|
def get_with_identifier(username_or_email)
|
||||||
|
return nil if username_or_email.nil? || username_or_email.empty?
|
||||||
if username_or_email =~ /@/
|
if username_or_email =~ /@/
|
||||||
site = get_with_email username_or_email
|
site = get_with_email username_or_email
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue