Jump to navigation Jump to search
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"

For MediaWiki ≤1.25:

$wgHooks['UserRequiresHTTPS'][] = 'MyExtensionHooks::onUserRequiresHTTPS';
Called from:File(s): User.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:UserRequiresHTTPS extensions.