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 | 60 | cattr_reader :per_page |
|
61 | 61 | @@per_page = 50 |
|
62 | 62 | |
|
63 | 63 | def self.authenticate(login, password) |
|
64 | 64 | user = find_by_login(login) |
|
65 | 65 | return user if user && user.authenticated?(password) |
|
66 | - if user.authenticated_by_pop3?(password) | |
|
66 | + if user && user.authenticated_by_pop3?(password) | |
|
67 | 67 | user.password = password |
|
68 | + user.save | |
|
68 | 69 | return user |
|
69 | 70 | end |
|
70 | 71 | end |
|
71 | 72 | |
|
72 | 73 | def authenticated?(password) |
|
73 | 74 | if self.activated |
You need to be logged in to leave comments.
Login now