]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Improved parameter checking
authorCraig Andrews <candrews@integralblue.com>
Wed, 18 Nov 2009 17:57:37 +0000 (12:57 -0500)
committerCraig Andrews <candrews@integralblue.com>
Wed, 18 Nov 2009 17:57:37 +0000 (12:57 -0500)
plugins/Authentication/AuthenticationPlugin.php
plugins/LdapAuthentication/LdapAuthenticationPlugin.php

index 1b9084187b4369d3a16b928c435f299f7912fc57..cd1de11491979539c2adfecd81acd18dbe1d6b58 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * StatusNet, the distributed open-source microblogging tool
  *
- * Superclass for plugins that do authentication and/or authorization
+ * Superclass for plugins that do authentication
  *
  * PHP version 5
  *
index ad5dd3a02211cb8fcaab64afe2ccc9c73653b1ce..664529497c8d62e7e4a2db52f52f68676de9f925 100644 (file)
@@ -63,6 +63,8 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
         if(!isset($this->attributes['username'])){
             throw new Exception("must specify a username attribute");
         }
+        if($this->password_changeable && (! isset($this->attributes['password']) || !isset($this->password_encoding))){
+            throw new Exception("if password_changeable is set, the password attribute and password_encoding must also be specified");
     }
     
     //---interface implementation---//