to check if the username exists in the database:
1) Create a new recordset. Set it to use the User table, and filter the email column on the email address form element.
2) Add server Validation form CSS Form builder. Use Number validation. For the server variable enter:
where <RecordsetName> is the name of the recordset.
set the minimum nuber to -1 and the maximum to 0.
this will cause validation to fail if the username is found in the database.