class SessionsController

app/controllers/sessions_controller.rb

Public Instance Methods

create() click to toggle source
# File app/controllers/sessions_controller.rb, line 4
def create
        existing_user = User.find_by_email(params[:user][:email])

if !existing_user.nil? && existing_user.dmponline3 && (existing_user.password == "" || existing_user.password.nil?) && existing_user.confirmed_at.nil? then
                redirect_to :controller => :existing_users, :action => :index, :email => params[:user][:email]
        else
                #after authentication verify if session[:shibboleth] exists

    if !params[:shibboleth_data].nil? then
        existing_user.update_attributes(:shibboleth_id => session[:shibboleth_data][:uid])
    end
    super
    
        end
end
destroy() click to toggle source
# File app/controllers/sessions_controller.rb, line 19
    def destroy
    current_user.plan_sections.each do |lock|
        lock.delete
        
    end
    super
end