"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; }