Use global fields and scripts set to run with full access permission to update their account settings. THe user enters the new password into a global field and then the script uses steps found in the Account category to update their password.
Each time I asked some thing you are the first one that answer me. I want to thank you and thank all members of the forum.
Please , some times I can't understood your posts . Can you please detail your answer . Thank you
And if an answer can't be understood, feel free to ask questions as you have done here.
Note: I haven't tried this in IWP. It works with regular filemaker and I do not know of any reason why it won't work with IWP, but test carefully to be sure.
Define a text field. Best option is likely to be a text field with global storage. We'll call it Table::gNewPassword1; Add some more global text fields: Table::gNewPassword2 and gOldPassword.
This script should allow the user to change their password:
Create a layout with all three of these new fields on it and a button to perform the following script:
Set Field [Table::gMessage ; "" ]
If [Not Isempty ( Table::gNewPassword1 ) And Table::gNewPassword1 = Table::gNewPassword2 ]
Set Error Capture [on]
Change Password [Old Password: Table::gOldpassword ; New Password: Table::gNewPassword1; no dialog ]
If [ Get ( LastError ) // an error occurred probably incorrect old password entered ]
Set Field [ Table::gMessage ; "Error changing password. Your password has not been changed"]
Set Field [ Table::gMessage ; "Password has been changed. Please make a note of your new password and use it the next time that you log in."]
Set Field [ Table::gMessage ; "Error entering new password."]
Hi Phil ;
Ypur script work perfectly .
But I have a multi User of this DB ; and if one of them want to chan ge his password , he can see every passwords record in the table.
how can I delete record from fields every time I change password , what I want to say that how to cleran fields after password changes??
The passwords should not be entered into any table and thus not available for any user to see.
Use global fields for password 1 and password 2. The values in these fields will not be retained when the user exits the database.