interesting challenge that would benefit from your wisdom:
Trying to provision a new community user (with preset password) via salesforce when a specific event takes place and trigger fires. I dont want the contact/user notified of anything - they'd just land on the site login, enter their known credentials and session is established.
The contact record exists, the community is active however if I try using Site.createPortalUser then Im told 'nope - that operation is allowed only from within an active site' (so for self registration I assume). Damn. If I try a simple user insert then I get the expected mixed DML error.
Soooo - how on earth does one use apex to provision a new customer community user account from an internal user perspective ?
Any ideas most appreciated!