entrance 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/entrance/controller.rb +4 -3
- data/lib/entrance/version.rb +1 -1
- metadata +1 -1
data/lib/entrance/controller.rb
CHANGED
@@ -19,9 +19,10 @@ module Entrance
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def authenticate_and_login(username, password, remember_me = false)
|
22
|
-
if user = Entrance.model.authenticate(username, password)
|
23
|
-
|
24
|
-
|
22
|
+
if user = Entrance.model.authenticate(username, password) \
|
23
|
+
and (!user.respond_to?(:can_login?) || user.can_login?)
|
24
|
+
login!(user, remember_me)
|
25
|
+
user
|
25
26
|
end
|
26
27
|
end
|
27
28
|
|
data/lib/entrance/version.rb
CHANGED