display('footer.tpl'); exit(); } /** * This is the function that is specific to your backend. It takes * the current password (as supplied by the user) and the desired * new password. It will return an array of messages. If everything * was successful, the array will be empty. Else, it will contain * the errormessage(s). * Constants to be used for these messages: * CPW_CURRENT_NOMATCH -> "Your current password is not correct." * CPW_INVALID_PW -> "Your new password contains invalid characters." * * @param array data The username/currentpw/newpw data. * @return array Array of error messages. */ function cpw_template_dochange($data) { // unfortunately, we can only pass one parameter to a hook function, // so we have to pass it as an array. $username = $data['username']; $curpw = $data['curpw']; $newpw = $data['newpw']; $msgs = array(); // your code here to change the password for $username from // $currentpw into $newpw. user_error('No valid backend defined: this is just a template', E_USER_ERROR); return $msgs; }