How to Show User Profile Number??
Permalink
I am running a contest which requires users to know their profile number.
Short of going tohttp://www.airsoftmanitoba.com/index.php/profile/... and clicking there own name to seehttp://www.airsoftmanitoba.com/index.php/profile/##/...
and viewing their number in the link?
Is it possible for me to show the person user number within text or in a block?
Any help, greatly appreciated. Would make this much easier for me.
Thank You!!
Short of going tohttp://www.airsoftmanitoba.com/index.php/profile/... and clicking there own name to seehttp://www.airsoftmanitoba.com/index.php/profile/##/...
and viewing their number in the link?
Is it possible for me to show the person user number within text or in a block?
Any help, greatly appreciated. Would make this much easier for me.
Thank You!!
Thank you for the reply.
Is there a way for me to display this within the HTML code of a "content" block?
I'm trying to have the number show as many times as possible i.e.
- Simply submit your user ID ## Over facebook to enter the contest
and other places.
I'm still new to coding and outputting attributes within Concrete.
Is there a way for me to display this within the HTML code of a "content" block?
I'm trying to have the number show as many times as possible i.e.
- Simply submit your user ID ## Over facebook to enter the contest
and other places.
I'm still new to coding and outputting attributes within Concrete.
I don't think it would be possible to display the user ID within the HTML block, but I can get you another really easy way to do it:
- Install the "Simple PHP Block" add-on:
http://www.concrete5.org/marketplace/addons/simple-php-block/...
- Add the block to an editable area
- Add the following code to the block:
Will this work for you?
- Install the "Simple PHP Block" add-on:
http://www.concrete5.org/marketplace/addons/simple-php-block/...
- Add the block to an editable area
- Add the following code to the block:
$u = new User(); $ID = $u->getUserID(); if($ID!=null){ echo "Your user ID is ".$ID; }
Will this work for you?
That will work. and I can keep playing around with it.
Thank You :)
Thank You :)
Glad I could help!
Please don't forget to mark as best answer so the thread is closed and we get our sweet, sweet karma =)
Please don't forget to mark as best answer so the thread is closed and we get our sweet, sweet karma =)
You can get and write user data programmatically. In you template or single page, you'll do something like this:
You'll find full documentation, showing all available methods, here:
http://www.concrete5.org/documentation/developers/permissions/users...
Hope this helps!