Page 1 of 1
Change password not working!
Posted: Fri May 10, 2019 6:19 am
by marc
Hi,
As a user, I cannot change my password in the "Change Login" menu. I enter my old PW, then the new one twice. "Password changed" (or similar) appears. When I log in, only the old password works. The new password will not be accepted.
Does this work for you

Re: Change password not working!
Posted: Fri May 10, 2019 7:31 am
by Janusz
Hi,
In my case the standard solution for password change is not working for users. The window is not appearing - but in your case I understand it does. So maybe not exactly the same case. But anyway here is the solution I did and works perfectly.
https://forums.nubuilder.cloud/viewtopic.php?f=19&t=9841
I prepared additional simple form with code taken from globeadmin User form and it works without any problem from users login.
Properies/Browse/SQL
Code: Select all
SELECT *
FROM zzzzsys_user
LEFT JOIN zzzzsys_access ON zzzzsys_access_id = sus_zzzzsys_access_id
ORDER BY sus_name
PHP before save
Code: Select all
if('#check_password#' != ''){
if('#new_password#' != '#check_password#'){
nuDisplayError('<b>Enter New Password</b> and <b>Reenter New Password</b> must match');
}
}
PHP after save
Code: Select all
if('#check_password#' != ''){
$pw = md5('#check_password#');
nuRunQuery("UPDATE zzzzsys_user SET sus_login_password = '$pw' WHERE zzzzsys_user_id = '#RECORD_ID#'");
}
Re: Change password not working!
Posted: Wed May 22, 2019 8:03 am
by kev1n
@Marc. I confirm, the "change login" functionality appears to be broken in the current version. (just tested with a fresh standalone installation)
@Janusz: Is there a form_id 'nupassword' in your table zzzzsys_form?
SELECT * FROM `zzzzsys_form` WHERE `zzzzsys_form_id` = 'nupassword'
Re: Change password not working!
Posted: Wed May 22, 2019 8:47 am
by Janusz
Re: Change password not working!
Posted: Thu May 23, 2019 1:16 am
by admin
marc,
It seems to work for me BUT you'll need to add the Password Form to the User's Access Level.
pw.JPG
Steven
Re: Change password not working!
Posted: Wed Sep 25, 2019 10:50 am
by johan
Hi
I'm having the same problem.
I've enabled nupassword and user can see the form to change his password.
When I fill in the fields (current - new - repeat) and save the form, user still can login with old password.
I've just updated nuBuilder to the current version.
Re: Change password not working!
Posted: Wed Sep 25, 2019 2:06 pm
by kev1n
Same here. A user cannot change the password himself. After pressing "Save", the new password is not saved in the database.
change_pw.png
Re: Change password not working!
Posted: Thu Sep 26, 2019 2:33 pm
by kev1n
Ok - here comes a fix:
Open the nuPassword form via the Developer Console (F12).
Paste this code and hit the return key:
Modify this part of the code in BS PHP event:
Code: Select all
$p = nuProcedure('nuCheckPasswordPolicy');
if($_POST['nuProcedureEval'] != 'Procedure <b></b> - run inside '){
eval($p);
if($check == false){
return;
}
}
Save the changes and enjoy a working save password dialog!
Info for the developer: This fix wouldn't be necessary if nuProcedure() returned an empty string in case the passed function does not exist.