Description:
fix pop3 authen
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r395:52cd3037bb5e - - 1 file changed: 2 inserted, 1 deleted
@@ -60,14 +60,15 | |||||
|
60 | cattr_reader :per_page |
|
60 | cattr_reader :per_page |
|
61 | @@per_page = 50 |
|
61 | @@per_page = 50 |
|
62 |
|
62 | ||
|
63 | def self.authenticate(login, password) |
|
63 | def self.authenticate(login, password) |
|
64 | user = find_by_login(login) |
|
64 | user = find_by_login(login) |
|
65 | return user if user && user.authenticated?(password) |
|
65 | return user if user && user.authenticated?(password) |
|
66 | - if user.authenticated_by_pop3?(password) |
|
66 | + if user && user.authenticated_by_pop3?(password) |
|
67 | user.password = password |
|
67 | user.password = password |
|
|
68 | + user.save | ||
|
68 | return user |
|
69 | return user |
|
69 | end |
|
70 | end |
|
70 | end |
|
71 | end |
|
71 |
|
72 | ||
|
72 | def authenticated?(password) |
|
73 | def authenticated?(password) |
|
73 | if self.activated |
|
74 | if self.activated |
You need to be logged in to leave comments.
Login now