Software /
code /
prosody-modules
Comparison
mod_auth_phpbb3/mod_auth_phpbb3.lua @ 626:f19f723571d9
mod_auth_phpbb3: Match the username_clean column instead of the username column when updating password.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 25 Mar 2012 02:30:36 +0500 |
parent | 421:816d8e3e83a3 |
child | 665:684cc57a49c1 |
comparison
equal
deleted
inserted
replaced
625:2c07bcf56a36 | 626:f19f723571d9 |
---|---|
188 function provider.get_password(username) | 188 function provider.get_password(username) |
189 return nil, "Getting password is not supported."; | 189 return nil, "Getting password is not supported."; |
190 end | 190 end |
191 function provider.set_password(username, password) | 191 function provider.set_password(username, password) |
192 local hash = phpbbCreateHash(password); | 192 local hash = phpbbCreateHash(password); |
193 local stmt, err = setsql("UPDATE `phpbb_users` SET `user_password`=? WHERE `username`=?", hash, username); | 193 local stmt, err = setsql("UPDATE `phpbb_users` SET `user_password`=? WHERE `username_clean`=?", hash, username); |
194 return stmt and true, err; | 194 return stmt and true, err; |
195 end | 195 end |
196 function provider.create_user(username, password) | 196 function provider.create_user(username, password) |
197 return nil, "Account creation/modification not supported."; | 197 return nil, "Account creation/modification not supported."; |
198 end | 198 end |