Extending the fields on Special:ChangePassword

Change-Id: I58f8765cec8bd55d8a98aff9ac9f736f5699c41e
This commit is contained in:
Ryan Lane 2012-06-13 18:21:14 +02:00
parent 4179be3c42
commit f78da3fe6c
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