stupid_auth 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/stupid_auth/model.rb +1 -1
- metadata +3 -3
data/lib/stupid_auth/model.rb
CHANGED
@@ -28,7 +28,7 @@ module StupidAuth
|
|
28
28
|
# attempt to authenticate a found user with the given password
|
29
29
|
# set the logged in at timestamp
|
30
30
|
def authenticate login, provided_password = nil
|
31
|
-
user = where("#{ login_field } like ?", login).first
|
31
|
+
user = where("upper(#{ login_field }) like ?", login.upcase).first
|
32
32
|
return nil unless user.present? and user.authenticated_by? provided_password
|
33
33
|
user.send :set_logged_in_at!
|
34
34
|
user
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stupid_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 7
|
10
|
+
version: 0.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dev Fu!
|