Sha256: 687b5d8264e57526b525e6bf700f429a4d05d84a68ffea8ed88c34adf54bd387

Contents?: true

Size: 560 Bytes

Versions: 37

Compression:

Stored size: 560 Bytes

Contents

# This controller handles the login/logout function of the site.  
class Backend::SessionsController < ApplicationController
  layout "backend"
  
  def create
    self.current_account = Account.authenticate(params[:email], params[:password])
    if logged_in?
      redirect_back_or_default(backend_path)
    else
      flash[:notice] = I18n.t("backend.sessions.wrong")
      redirect_to new_backend_session_path
    end
  end

  def destroy
    reset_session
    flash[:notice] = I18n.t("backend.sessions.logout")
    redirect_back_or_default('/')
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
lipsiadmin-5.1.6 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.1.5 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.1.4 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.1.3 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.1.2 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.1.1 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.1.0 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.0.9 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.0.8 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.0.7 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.0.6 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.0.5 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.0.4 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-4.1.8 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.0.0 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.0.1 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.0.2 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-5.0.3 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-3.2 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb
lipsiadmin-3.1 lipsiadmin_generators/backend/templates/controllers/backend/sessions_controller.rb