during the createNewUser hook. This can occur when parallel requests with the same POST data are processed. This is hard to reproduce though. In the real world it can only happen with browsers that allow sending the same form multiple times (by clicking the submit button multiple times) - which most modern browsers don't (I can only reproduce it sometimes with Internet Explorer).
This PR introduces an additional safety check in the save_callback for tl_member.email, so that the form will not validate, if a username with the same e-mail address is already in the database at this point in time.
I think we should probably also lock the table to be sure that between the username check and the username update no new entry with the same username is made.
There can be edge cases where the following error occurs:
during the
createNewUser
hook. This can occur when parallel requests with the same POST data are processed. This is hard to reproduce though. In the real world it can only happen with browsers that allow sending the same form multiple times (by clicking the submit button multiple times) - which most modern browsers don't (I can only reproduce it sometimes with Internet Explorer).This PR introduces an additional safety check in the
save_callback
fortl_member.email
, so that the form will not validate, if a username with the same e-mail address is already in the database at this point in time.