From 1d6bacc681eca89b7c20bb96fbacf5bcb8434d88 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Wed, 18 Nov 2009 12:57:37 -0500 Subject: Improved parameter checking --- plugins/LdapAuthentication/LdapAuthenticationPlugin.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/LdapAuthentication') diff --git a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php index ad5dd3a02..664529497 100644 --- a/plugins/LdapAuthentication/LdapAuthenticationPlugin.php +++ b/plugins/LdapAuthentication/LdapAuthenticationPlugin.php @@ -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---// -- cgit v1.2.3-54-g00ecf