mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-27 09:40:28 +00:00
Merge "Extending the fields on Special:ChangePassword"
This commit is contained in:
commit
9e2961970a
|
@ -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