Hi,
I have a change password function, where you enter the old password, then a new password twice, it works ok, apart from the feedback it gives. If a user enters the original password wrong, it will tell them, if the new password isn't valid format, it will tell them, however if the 2 new passwords don't match, it just fails, it won't tell them why.
Here is the code,
function user_change_password ($new_password1,$new_password2,$old_password) {
global $feedback;
if ($new_password1 && ($new_password1 == $new_password2)) {
if (account_pwvalid($new_password1)) {
if ($sName && $old_password) {
\\ Update Function Goes Here
} else {
$feedback .= ' Must Provide User Name And Old Password ';
return false;
}
} else {
$feedback .= ' New Passwords Doesn\'t Meet Criteria ';
return false;
}
} else {
return false;
$feedback .= ' New Passwords Must Match ';
}
}
Its this last } else { bit that doesn't work, can anyone see why 'New Passwords Must Match' does get shown?
Cheers
Ben