mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Force new users to fill out their name before trying to register
This commit is contained in:
parent
c3c8c2df34
commit
40a283a244
1 changed files with 4 additions and 0 deletions
|
|
@ -5,6 +5,10 @@ class ConferenceRegistrationController < ApplicationController
|
||||||
# TODO Figure out how to change the route's id from :id to :conference_id
|
# TODO Figure out how to change the route's id from :id to :conference_id
|
||||||
@conference = Conference.find_all_by_short_title(params[:id]).first
|
@conference = Conference.find_all_by_short_title(params[:id]).first
|
||||||
@person = current_user.person
|
@person = current_user.person
|
||||||
|
if @person.first_name.blank? || @person.last_name.blank?
|
||||||
|
redirect_to(edit_user_registration, :alert => "Please fill in your first and last name before registering.")
|
||||||
|
return
|
||||||
|
end
|
||||||
@registration = @person.registrations.where(:conference_id => @conference.id).first
|
@registration = @person.registrations.where(:conference_id => @conference.id).first
|
||||||
@registered = true
|
@registered = true
|
||||||
if @registration.nil?
|
if @registration.nil?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue