EndPublicXRDS: End XRDS output (right before the closing XRDS tag)
- $action: the current action
- &$xrdsoutputter - XRDSOutputter object to write to
+
+CheckPassword: Check a username/password
+- $nickname: The nickname to check
+- $password: The password to check
+- &$authenticated: set to true to indicate authentication succeeded.
if (is_null($user) || $user === false) {
return false;
} else {
- if (0 == strcmp(common_munge_password($password, $user->id),
- $user->password)) {
+ $authenticated = false;
+ Event::handle('CheckPassword', array($nickname, $password, &$authenticated));
+ if(! $authenticated){
+ //no handler asserted the user, so check ourselves
+ if (0 == strcmp(common_munge_password($password, $user->id),
+ $user->password)) {
+ //internal checking passed
+ $authenticated = true;
+ }
+ }
+ if($authenticated){
return $user;
} else {
return false;