Merge "Fix form submission on Special:RandomInCategory"
[lhc/web/wiklou.git] / includes / User.php
index dcfc511..25b35b3 100644 (file)
@@ -2610,7 +2610,12 @@ class User {
                if ( !$wgSecureLogin ) {
                        return false;
                } else {
-                       return $this->getBoolOption( 'prefershttps' );
+                       $https = $this->getBoolOption( 'prefershttps' );
+                       wfRunHooks( 'UserRequiresHTTPS', array( $this, &$https ) );
+                       if ( $https ) {
+                               $https = wfCanIPUseHTTPS( $this->getRequest()->getIP() );
+                       }
+                       return $https;
                }
        }