PDA

View Full Version : userid of profile


sifuhall
09-24-2009, 01:13 PM
I need to determine if the user viewing the profile is the owner of the profile.

I can create a template conditional and know how to determine the user id of the person viewing the profile, but how can I determine the user id of the profile the person is viewing?

Baldilocks
09-24-2009, 01:27 PM
You just need to make sure it's enabled.

AdminCP>Usergroups

Edit the Usergroup you are interested in and look for "Who's Online Permissions" make sure they all say YES.

sifuhall
09-24-2009, 01:44 PM
Sorry, I wasn't very clear at all.

I should have stated that I am making edits in the profile templates and want to display specific info only if the person viewing that profile is the owner of that profile.

James Birkett
09-24-2009, 02:03 PM
You could try using $user['userid'] to determine the current user viewing.. maybe.

sifuhall
09-24-2009, 02:36 PM
Thanks for the reply.

And yep, that part I have. But how do I know the userid of the profile being viewed?

Lynne
09-24-2009, 02:48 PM
$bbuserinfo[userinfo] is the userid of the person viewing the page. Which template are you trying to do the condition in? If it's the MEMBERINFO template, I think $prepared['userid'] is the userid of the person who's profile you are on.

James Birkett
09-24-2009, 02:49 PM
The userID of that is in the URL. Maybe you could manipulate that?
http://example.tld/forum/member.php?u=321

Bold = User ID

EDIT: Lynne seems to have done it :p

sifuhall
09-24-2009, 03:07 PM
Thanks Lynne!