We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit a82df5fa authored by Craig Andrews's avatar Craig Andrews

Added a CheckPassword event

parent 384a50a7
......@@ -474,3 +474,8 @@ StartPublicXRDS: Start XRDS output (right after the opening XRDS tag)
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.
......@@ -127,8 +127,17 @@ function common_check_user($nickname, $password)
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;
return $user;
} else {
return false;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment