mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-07 09:48:50 +01:00
Fixed a problem where nosignup.rhtml wouldn't render when a non-admin user attempted to signup because the admin_email was nil. We now get the admin user's email address, which is what should happen anyway.
Fixes #203. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@184 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
62087003f1
commit
7172b64c20
2 changed files with 2 additions and 1 deletions
|
|
@ -28,6 +28,7 @@ class LoginController < ApplicationController
|
|||
def signup
|
||||
unless (User.find_all.empty? || ( @session['user'] && @session['user']['is_admin'] ) )
|
||||
@page_title = "No signups"
|
||||
@admin_email = User.find(1).preferences["admin_email"]
|
||||
render :action => "nosignup"
|
||||
return
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<div title="No signups" id="signupform" class="form">
|
||||
<h3>No Signups</h3>
|
||||
<p>You don't have permission to sign up for a new account.</p>
|
||||
<p>Please contact the site administrator <%= mail_to "#{app_configurations["admin"]["email"]}", "by email", :encode => "hex" %> to get permission.</p>
|
||||
<p>Please contact the site administrator <%= mail_to "#{@admin_email}", "by email", :encode => "hex" %> to get permission.</p>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue