diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb deleted file mode 100644 index 929c316a..00000000 --- a/app/controllers/sessions_controller.rb +++ /dev/null @@ -1,26 +0,0 @@ -class SessionsController < Devise::SessionsController - prepend_before_filter :require_no_authentication, :only => [ :new, :create ] - include Devise::Controllers::InternalHelpers - - # POST /resource/sign_in - def create - # login_password = params[:user][:password] - # login_uid = params[:user][:nccu_ldap_uid] - login_password = params[:user][:password] - login_email = params[:user][:email] - result = false - resource = User.first(conditions:{ email: login_email }) - set_flash_message(:notice, :signed_in) if is_navigational_format? - if resource.nil? - logger.error "Can't find user #{login_email}" - flash[:notice] = t('devise.failure.invalid') - render :action => "new" - else - logger.info "=== passed" - resource_name = resource.class.to_s.downcase - sign_in(resource_name, resource) - respond_with resource, :location => redirect_location(resource_name, resource) - end - end - -end diff --git a/app/models/user/user.rb b/app/models/user/user.rb index 3ae7bf5d..5893dae2 100644 --- a/app/models/user/user.rb +++ b/app/models/user/user.rb @@ -9,10 +9,7 @@ class User field :admin, :type => Boolean, :default => true field :active_role - field :nccu_ldap_uid field :email - # field :cache_dept - # has_one :cache_dept, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy field :cache_dept,type: Hash field :status_record,type: Hash diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 1ab2e89b..f394700c 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -3,11 +3,11 @@