By Anthony on Monday, 12 November 2018
Posted in Technical Issues
Likes 0
Views 501
Votes 0
I'm using onUserAfterSave to get when a new user has been created. It is triggerering correctly, but I'm having trouble determining which profile the user registered with.
Do you have any suggestions on how to get the profile id that they registered with? I'm doing this within a custom plugin.
Any help would be much appreciated.
Don't worry, I found it.

$my = ES::user();
// Retrieve the user's profile object
$profile = $my->getProfile();
// Retrieve the user's profile type id
$profiletype=$profile->id;
·
Monday, 12 November 2018 20:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for getting back to us you found the solution.

Just for your information, I have locked and marked this thread as resolved to avoid confusions in the future. Please start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiries.

Thanks for understanding
·
Tuesday, 13 November 2018 09:51
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post