Page 1 of 1

users changing their own passwords

Posted: Tue Jul 05, 2016 2:13 am
by mlawton
I would like to enable my users to change their own passwords, rather than my having to change the passwords for them. I have created a form to update zzzsys_user and have restricted it to display only the record for the current logged in user (using #nu_user_id#). So far so good. But I need to know the encryption algorithm used by nuBuilder in order to save the correctly encrypted password in zzzsys_user. I assumed it is MD5 but it appears it is not, as I have tried it and MD5 creates the same string length but a different value than what is stored by nuBuilder when I change a password using the Users form logged in as globeadmin.

Alternatively, if someone has another approach that would achieve my goal, please let me know. Thanks.

Update: I solved this myself. Looking at the 'use' form in the zzzsys_form table, I can see the code used to generate the password (md5, but with a concatenated text value). However, I also realized there is a much simpler way to achieve my goal. I created a button that calls the 'use' form, passing the #nu_user_id# as the record id. I also updated the zzzsys_object table and added a select statement in the sob_all_display_condition column to hide the user group field on that form for regular users.

Re: users changing their own passwords

Posted: Wed Jul 06, 2016 5:04 am
by admin
Good thinking.

Re: users changing their own passwords

Posted: Sat Jan 28, 2017 1:30 pm
by SteveHolland
Very useful post. In my car-reconditioning database the qualified users now have a button to change the password for the showroom visitor login. For this I entered the record id of the visitors' login name instead of #zzzsys_user_id#. The button now leads directly to the visitors' login details. I hesitate on removing the user group details as I'm not sure of the right procedure to do that part of the posted tip...

Re: users changing their own passwords

Posted: Sun Jan 29, 2017 9:45 pm
by admin
SteveHolland,

Just leave the user group details there, why delete them?

Steven