Sha256: 6b2336d01263c490b59cf28f43edd8484e9c2fcbcb0b03a23998fac5996c699c

Contents?: true

Size: 532 Bytes

Versions: 6

Compression:

Stored size: 532 Bytes

Contents

module Goma
  module Controllers
    module Confirmable
      def login(identifier, password, remember_me=false, scope: Goma.config.default_scope)
        record = super
        if record && record.goma_config.modules.include?(:confirmable)
          if record.activated? || record.unactivated_access_allowed_period?
            record
          else
            warden.logout(scope)
            _goma_error[scope] = :not_activated
            nil
          end
        else
          record
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
goma-0.0.1.rc3 lib/goma/controllers/confirmable.rb
goma-0.0.1.rc2 lib/goma/controllers/confirmable.rb
goma-0.0.1.rc1 lib/goma/controllers/confirmable.rb
goma-0.0.1.gamma lib/goma/controllers/confirmable.rb
goma-0.0.1.beta lib/goma/controllers/confirmable.rb
goma-0.0.1.alpha lib/goma/controllers/confirmable.rb