By Adam O. on Wednesday, 07 October 2015
Replies 5
Likes 0
Views 782
Votes 0
Hi there,

I've got simple question - how to check in ES what is my Profile Type ID?

I need to check eg. if I'm in Profile Type ID=1 then do something


I'll be very grateful for your help!
Best regards!
Adam
Hello Adam,

In Easysocial environment, you can use this code:

$my = FD::user();
echo $my->id; // you will get your ID.


Hope this helps.
·
Wednesday, 07 October 2015 11:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Nik!

Thank your for your reply

But you don't understood myquestion - I mean Profile Type ID

I have made 4 Profile Types in ES backend. I can load actually viewed user Profile Type ID by:

$myptid = $user->getProfile()->get('id');
echo $myptid;


but I don't know how to show my own Profile Type ID...

I need load this in EasySocial environment - in default.header.php

Best regards!
Adam
·
Thursday, 08 October 2015 05:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Adam,

Ah, I see. You can try this:

$myptid = $user->profile_id;
echo $myptid;
·
Thursday, 08 October 2015 10:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you!

Best regards!
Adam
·
Friday, 09 October 2015 02:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Adam,

You are most welcome.
·
Saturday, 10 October 2015 17:45
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post