You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that even if only one contact is identified in the custom SOQL on the component using some other identifier, it is still possible for the wrong contact to be associated with the created Site User if that contact shares a matching Email Address.
This may be an issue with the Site.CreateExternalUser method: createExternalUser(user, accountId, password)
According to the documentation, it seems to look for any contact under the Account with a matching email.
Thought I would raise this issue for awareness, maybe there is a workaround.
The text was updated successfully, but these errors were encountered:
Interesting find in the documentation. It would seem to defeat the point of going to the trouble of identifying and setting the ContactId on the user object that is passed in as the first parameter. The only workaround I can think of would be to manually craft and inserting the user, setting a ContactId at the point of creation (i.e the one found from the query) and password by using the System.SetPassword() method. However, reading on Stackoverflow I think these methods come with their own issues so will need to explore further...
I've noticed that even if only one contact is identified in the custom SOQL on the component using some other identifier, it is still possible for the wrong contact to be associated with the created Site User if that contact shares a matching Email Address.
This may be an issue with the Site.CreateExternalUser method: createExternalUser(user, accountId, password)
According to the documentation, it seems to look for any contact under the Account with a matching email.
Thought I would raise this issue for awareness, maybe there is a workaround.
The text was updated successfully, but these errors were encountered: