2020-03-03 22:50:34 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MediaWiki\Api\Hook;
|
|
|
|
|
|
|
|
|
|
/**
|
2020-03-16 23:31:05 +00:00
|
|
|
* @deprecated since 1.24 Use ApiQueryTokensRegisterTypes instead.
|
2020-03-03 22:50:34 +00:00
|
|
|
* @ingroup Hooks
|
|
|
|
|
*/
|
|
|
|
|
interface APIQueryUsersTokensHook {
|
|
|
|
|
/**
|
|
|
|
|
* Use this hook to add custom token to list=users. Every token has an action,
|
|
|
|
|
* which will be used in the ustoken parameter and in the output
|
|
|
|
|
* (actiontoken="..."), and a callback function which should return the token, or
|
|
|
|
|
* false if the user isn't allowed to obtain it. The prototype of the callback
|
2020-03-16 23:31:05 +00:00
|
|
|
* function is func($user) where $user is the User object. In the hook, add
|
2020-03-03 22:50:34 +00:00
|
|
|
* your callback to the $tokenFunctions array and return true (returning false
|
|
|
|
|
* makes no sense).
|
|
|
|
|
*
|
|
|
|
|
* @since 1.35
|
|
|
|
|
*
|
2020-03-16 23:31:05 +00:00
|
|
|
* @param array &$tokenFunctions [ action => callback ]
|
|
|
|
|
* @return bool|void True or no return value
|
2020-03-03 22:50:34 +00:00
|
|
|
*/
|
|
|
|
|
public function onAPIQueryUsersTokens( &$tokenFunctions );
|
|
|
|
|
}
|