Update form problem
I used SA 'create security pages' wizard for the 5 standard pages, and there is a User List page as well. There is a SuperAdmin who has access to the user pages, who registers & updates the users. Forgot & reset password page for the users works fine. These users have various degrees of access to the backend, which is all working well except for the Update User page.
No problem registering new users. I have another page where the logged-in Superadmin can update their own details. This page uses the session variable set at login (SecurityAssist_User_ID). Works fine.
In the Users table, username & email fields have unique indexes.
SuperAdmin logs in to the Users section >> List of users >> Linked to Update page using User_ID from recordset. I set a session variable to capture this User_ID. I changed the Unique Database Value Server Validations for username & email to check against this SV.
I've put a series of echos for the session variables and the User_ID binding on the update user page so I can track what's going on before and after the update. Everything looks good before the update, but after the update, all echos are cleared except for SecurityAssist_User_ID. Then there is a message:
"Invalid information, please check your entries and try again. The value you entered for the username field is already contained in our records. The value you entered for the email field is already contained in our records."
"No record found."
If I change the username & email on the update form so it is not limited by the Unique server validation, I get the message:
"Information updated successfully"
"No record found"
but no changes
So the recordset values disappear after updating. (Show RS when empty)
And the Update Record SB & Server Validations can't override the unique restraints. Acting like the Insert Record SB.
I've been trying loads of different options, but nothing doing.
Should I send you the code for the 2 pages?