comparison mod_auth_phpbb3/mod_auth_phpbb3.lua @ 375:cac309a3d655

mod_auth_phpbb3: Fixed traceback when logging in as a non-existent user.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 01 Jul 2011 07:52:01 +0500
parents 2dd6dfda94d6
children 8f5726adc61e
comparison
equal deleted inserted replaced
374:2dd6dfda94d6 375:cac309a3d655
155 155
156 function provider.test_password(username, password) 156 function provider.test_password(username, password)
157 module:log("debug", "test_password '%s' for user %s", password, username); 157 module:log("debug", "test_password '%s' for user %s", password, username);
158 158
159 local hash = get_password(username); 159 local hash = get_password(username);
160 return phpbbCheckHash(password, hash); 160 return hash and phpbbCheckHash(password, hash);
161 end 161 end
162 function provider.user_exists(username) 162 function provider.user_exists(username)
163 module:log("debug", "test user %s existence", username); 163 module:log("debug", "test user %s existence", username);
164 return get_password(username) and true; 164 return get_password(username) and true;
165 end 165 end