cleanups for account validation

This commit is contained in:
Kyle Drake 2024-04-08 15:12:56 -05:00
parent bb430d455f
commit 10acf8e7bb
4 changed files with 15 additions and 11 deletions

View file

@ -16,7 +16,6 @@ end
def require_login
redirect '/' unless signed_in? && current_site
redirect '/tutorial/html/1' if current_site.tutorial_required && !(request.path =~ /tutorial/)
end
def signed_in?
@ -97,12 +96,6 @@ def dont_browser_cache
@dont_browser_cache = true
end
def email_not_validated?
return false if current_site && current_site.created_at < Site::EMAIL_VALIDATION_CUTOFF_DATE
current_site && current_site.parent? && !current_site.is_education && !current_site.email_confirmed && !current_site.supporter?
end
def sanitize_comment(text)
Rinku.auto_link Sanitize.fragment(text), :all, 'target="_blank" rel="nofollow"'
end