Manual:Hooks/UserRequiresHTTPS
This deprecated feature should no longer be used, but is still available for reasons of backwards compatibility. This feature was deprecated in version 1.35.0. This hook, along with BeforeHttpsRedirect and CanIPUseHTTPS, were deprecated together in Gerrit change 608504 as part of a long-term plan to remove support for mixed HTTP/HTTPS wikis. |
UserRequiresHTTPS | |
---|---|
Available from version 1.22.0 (Gerrit change 80030) Allows extensions to override whether users need to be redirected to HTTPS | |
Define function: | public static function onUserRequiresHTTPS( $user, &$https ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"UserRequiresHTTPS": "MyExtensionHooks::onUserRequiresHTTPS"
}
}
|
Called from: | File(s): user/User.php |
Interface: | UserRequiresHTTPSHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:UserRequiresHTTPS extensions.
DetailsEdit
Allows extensions to override whether users need to be redirected to HTTPS, which is normally decided based on the prefershttps
user preference. The value of that preference is passed in as the $https
parameter for the hook to manipulate.