+ Start a Discussion

How to get user in a query in a controller

Inserting Community User by DML. Once the DML is done salesforce send a welcome Email to the user.

I want to use a VF email template there and check the user profile in controller.How to get the user in controller.

P.S: I can't use custom code to send this email as that will not populate Community_URL in email template. I will use merge field in email template for the same.