Description:
fix wrong merge on user
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r845:daf5f8de8a3f - - 1 file changed: 4 inserted, 0 deleted
@@ -79,24 +79,28 | |||||
|
79 | end |
|
79 | end |
|
80 | end |
|
80 | end |
|
81 |
|
81 | ||
|
82 |
|
82 | ||
|
83 | def authenticated?(password) |
|
83 | def authenticated?(password) |
|
84 | if self.activated |
|
84 | if self.activated |
|
85 | hashed_password == User.encrypt(password,self.salt) |
|
85 | hashed_password == User.encrypt(password,self.salt) |
|
86 | else |
|
86 | else |
|
87 | false |
|
87 | false |
|
88 | end |
|
88 | end |
|
89 | end |
|
89 | end |
|
90 |
|
90 | ||
|
|
91 | + def login_with_name | ||
|
|
92 | + "[#{login}] #{full_name}" | ||
|
|
93 | + end | ||
|
|
94 | + | ||
|
91 | def authenticated_by_cucas?(password) |
|
95 | def authenticated_by_cucas?(password) |
|
92 | url = URI.parse('https://www.cas.chula.ac.th/cas/api/?q=studentAuthenticate') |
|
96 | url = URI.parse('https://www.cas.chula.ac.th/cas/api/?q=studentAuthenticate') |
|
93 | appid = '41508763e340d5858c00f8c1a0f5a2bb' |
|
97 | appid = '41508763e340d5858c00f8c1a0f5a2bb' |
|
94 | appsecret ='d9cbb5863091dbe186fded85722a1e31' |
|
98 | appsecret ='d9cbb5863091dbe186fded85722a1e31' |
|
95 | post_args = { |
|
99 | post_args = { |
|
96 | 'appid' => appid, |
|
100 | 'appid' => appid, |
|
97 | 'appsecret' => appsecret, |
|
101 | 'appsecret' => appsecret, |
|
98 | 'username' => login, |
|
102 | 'username' => login, |
|
99 | 'password' => password |
|
103 | 'password' => password |
|
100 | } |
|
104 | } |
|
101 |
|
105 | ||
|
102 | #simple call |
|
106 | #simple call |
You need to be logged in to leave comments.
Login now