Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Display user id in profile

11 years 5 months ago
Licenses:
JomSocial Expired iSEO Expired Socialize Expired

hi, we need to display the user id from every User on his profilesite.
thanks for help!

regards Jürgen

11 years 5 months ago
Licenses:

Hi, Jurgen.

Just paste this code wherever you need:

<?php
$user = JFactory::getUser();
echo 'User ID  : ' . $user->id;
?>


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
11 years 5 months ago
Licenses:
JomSocial Expired iSEO Expired Socialize Expired

thanks, but i need the id from user i visit

11 years 5 months ago
Licenses:

Hi, Jurgen.

Then use this code:

<?php echo $this->profile->id; ?>


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: Jürgen
11 years 5 months ago
Licenses:
JomSocial Expired iSEO Expired Socialize Expired

$user = JFactory::getUser();
echo 'User ID : ' . $this->profile->id;

or only
echo 'User ID : ' . $this->profile->id;

is not working - sorry

11 years 5 months ago
Licenses:

Hi, Jurgen.

Only my latest code:

<?php echo 'User ID : ' . $this->profile->id; ?>

It works 100%:

prntscr.com/780sj4
prntscr.com/780ssg

I pasted that code into:

ROOT/components/com_community/templates/jomsocial/layouts/profile/focus.php


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: Albert, Jürgen
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW