@@ -167,7 +167,7 class User < Principal | |||
|
167 | 167 | |
|
168 | 168 | # Returns the user who matches the given autologin +key+ or nil |
|
169 | 169 | def self.try_to_autologin(key) |
|
170 | tokens = Token.find_all_by_action_and_value('autologin', key) | |
|
170 | tokens = Token.find_all_by_action_and_value('autologin', key.to_s) | |
|
171 | 171 | # Make sure there's only 1 token that matches the key |
|
172 | 172 | if tokens.size == 1 |
|
173 | 173 | token = tokens.first |
@@ -341,12 +341,12 class User < Principal | |||
|
341 | 341 | end |
|
342 | 342 | |
|
343 | 343 | def self.find_by_rss_key(key) |
|
344 | token = Token.find_by_value(key) | |
|
344 | token = Token.find_by_value(key.to_s) | |
|
345 | 345 | token && token.user.active? ? token.user : nil |
|
346 | 346 | end |
|
347 | 347 | |
|
348 | 348 | def self.find_by_api_key(key) |
|
349 | token = Token.find_by_action_and_value('api', key) | |
|
349 | token = Token.find_by_action_and_value('api', key.to_s) | |
|
350 | 350 | token && token.user.active? ? token.user : nil |
|
351 | 351 | end |
|
352 | 352 |
General Comments 0
You need to be logged in to leave comments.
Login now