diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php
index 5886101..40db6d1 100644
--- a/auth/ldap/auth.php
+++ b/auth/ldap/auth.php
@@ -1844,6 +1844,9 @@ class auth_plugin_ldap extends auth_plugin_base {
      */
     function loginpage_hook() {
         global $CFG, $SESSION;
+
+        // HTTPS is potentially required
+        httpsrequired();
  
         if (($_SERVER['REQUEST_METHOD'] === 'GET'         // Only on initial GET of loginpage
                 || ($_SERVER['REQUEST_METHOD'] === 'POST'

