From d6ddb84132d7b9510ba82064c67f2a39822dab49 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Thu, 5 Nov 2009 23:27:18 -0500 Subject: Add ChangePassword event --- plugins/Ldap/LdapPlugin.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'plugins/Ldap/LdapPlugin.php') diff --git a/plugins/Ldap/LdapPlugin.php b/plugins/Ldap/LdapPlugin.php index cabd3c828..755562f54 100644 --- a/plugins/Ldap/LdapPlugin.php +++ b/plugins/Ldap/LdapPlugin.php @@ -86,10 +86,20 @@ class LdapPlugin extends Plugin } } } - //error_log(print_r($registration_data,1)); + //set the database saved password to a random string. + $registration_data['password']=common_good_rand(16); $user = User::register($registration_data); //prevent other handlers from running, as we have registered the user return false; } } + + function onChangePassword($nickname,$oldpassword,$newpassword,&$errormsg) + { + //TODO implement this + $errormsg = _('Sorry, changing LDAP passwords is not supported at this time'); + + //return false, indicating that the event has been handled + return false; + } } -- cgit v1.2.3-54-g00ecf