Help using $bp->displayed_user->id
Is there any way that I can use $bp->displayed_user->id within a php code?
I’m using an external plugin, which needs to retrieve user id like this:
<?php functionname (userid, 'definition') ?>
and I was trying to use $bp->displayed_user->id to get user id, but I couldn’t. I also tried wp’s the_author_ID but it failed as I can’t use it within the loop.
<?php echo $bp->displayed_user->id ?>
This above returns the user ID properly… but it can’t be used within another php code as far as I’ve tried…
Do you know any other ways to get user ID?
You must be logged in to reply to this topic.