users changing their own passwords
Posted: Tue Jul 05, 2016 2:13 am
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.
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.