<?php
/**
- * Copyright © 2016 Brad Jorsch <bjorsch@wikimedia.org>
+ * Copyright © 2016 Wikimedia Foundation and contributors
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
public function execute() {
if ( !$this->getUser()->isLoggedIn() ) {
- $this->dieUsage( 'Must be logged in to remove authentication data', 'notloggedin' );
+ $this->dieWithError( 'apierror-mustbeloggedin-removeauth', 'notloggedin' );
}
$params = $this->extractRequestParams();
}
);
if ( count( $reqs ) !== 1 ) {
- $this->dieUsage( 'Failed to create change request', 'badrequest' );
+ $this->dieWithError( 'apierror-changeauth-norequest', 'badrequest' );
}
$req = reset( $reqs );
// Perform the removal
$status = $manager->allowsAuthenticationDataChange( $req, true );
+ Hooks::run( 'ChangeAuthenticationDataAudit', [ $req, $status ] );
if ( !$status->isGood() ) {
$this->dieStatus( $status );
}
}
public function getHelpUrls() {
- return 'https://www.mediawiki.org/wiki/API:Manage_authentication_data';
+ return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Manage_authentication_data';
}
}