]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Show messaging on the login and registration forms informing users that they may...
authorCraig Andrews <candrews@integralblue.com>
Fri, 26 Feb 2010 20:50:51 +0000 (15:50 -0500)
committerCraig Andrews <candrews@integralblue.com>
Fri, 26 Feb 2010 20:51:25 +0000 (15:51 -0500)
plugins/LdapAuthentication/LdapAuthenticationPlugin.php

index 1b5dc92e3f12c6c48fd60c9b600573cdab858b42..d6a945f4977bca229bbbaeea56729e6248751c4c 100644 (file)
@@ -76,6 +76,32 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
             return false;
         }
     }
+
+    function onEndShowPageNotice($action)
+    {
+        $name = $action->trimmed('action');
+        $instr = false;
+
+        switch ($name)
+        {
+         case 'register':
+            if($this->autoregistration) {
+                $instr = 'Have an LDAP account? Use your standard username and password.';
+            }
+            break;
+         case 'login':
+            $instr = 'Have an LDAP account? Use your standard username and password.';
+            break;
+         default:
+            return true;
+        }
+
+        if($instr) {
+            $output = common_markup_to_html($instr);
+            $action->raw($output);
+        }
+        return true;
+    }
     
     //---interface implementation---//