Change password not working!

Questions related to using nuBuilder Forte.

Change password not working!

Postby marc » Fri May 10, 2019 1:49 pm

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 :?:
marc
 
Posts: 74
Joined: Mon May 14, 2018 10:56 pm

Re: Change password not working!

Postby Janusz » Fri May 10, 2019 3:01 pm

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.
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#'");

}
Janusz
 
Posts: 229
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: Change password not working!

Postby kev1n » Wed May 22, 2019 3:33 pm

@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'
kev1n
 
Posts: 267
Joined: Mon Oct 15, 2018 2:13 am

Re: Change password not working!

Postby Janusz » Wed May 22, 2019 4:17 pm

Yes it is - and looks like following:

https://drive.google.com/open?id=12FzKT ... e-MPetY5Og
Janusz
 
Posts: 229
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: Change password not working!

Postby admin » Thu May 23, 2019 8:46 am

marc,

It seems to work for me BUT you'll need to add the Password Form to the User's Access Level.

pw.JPG
pw.JPG (33.79 KiB) Viewed 407 times



Steven
admin
Site Admin
 
Posts: 3135
Joined: Mon Jun 15, 2009 9:53 am

Re: Change password not working!

Postby johan » Wed Sep 25, 2019 6:20 pm

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.
johan
 
Posts: 270
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: Change password not working!

Postby kev1n » Wed Sep 25, 2019 9:36 pm

Same here. A user cannot change the password himself. After pressing "Save", the new password is not saved in the database.

change_pw.png
change_pw.png (8.85 KiB) Viewed 129 times
kev1n
 
Posts: 267
Joined: Mon Oct 15, 2018 2:13 am

Re: Change password not working!

Postby kev1n » Thu Sep 26, 2019 10:03 pm

Ok - here comes a fix:

Open the nuPassword form via the Developer Console (F12).

Paste this code and hit the return key:

Code: Select all
nuForm('nuPassword','-1','', '')


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.
kev1n
 
Posts: 267
Joined: Mon Oct 15, 2018 2:13 am


Return to General



cron