mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-24 00:05:24 +00:00
Extending the fields on Special:ChangePassword
Change-Id: I58f8765cec8bd55d8a98aff9ac9f736f5699c41e
This commit is contained in:
parent
4179be3c42
commit
f78da3fe6c
|
@ -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';
|
||||
|
||||
|
|
10
OATHUser.php
10
OATHUser.php
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue