Merge "Extending the fields on Special:ChangePassword"

This commit is contained in:
Demon 2012-06-15 14:57:03 +00:00 committed by Gerrit Code Review
commit 9e2961970a
2 changed files with 11 additions and 0 deletions

View file

@ -50,6 +50,7 @@ $wgResourceModules['ext.oathauth'] = array(
$wgHooks['ChainAuth'][] = 'OATHUser::ChainAuth';
$wgHooks['UserLoginForm'][] = 'OATHUser::ModifyUITemplate';
$wgHooks['ChangePasswordForm'][] = 'OATHUser::ChangePasswordForm';
# Schema updates
$wgHooks['LoadExtensionSchemaUpdates'][] = 'efOATHAuthSchemaUpdates';

View file

@ -294,6 +294,16 @@ class OATHUser {
return true;
}
/**
* @param $extraFields array
* @return bool
*/
static function ChangePasswordForm( &$extraFields ) {
$tokenField = array( 'wpOATHToken', 'oathauth-token', 'password', '' );
array_push( $extraFields, $tokenField );
return true;
}
/**
* @param $username string
* @param $password string