user defined tag & frontend user

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
pgherveou

user defined tag & frontend user

Post by pgherveou »

Hi guys

I would like to get the id of the frontend user logged in a "user defined tag"
I know I can get the username with this code

Code: Select all

$tpl_vars = $gCms->smarty->get_template_vars();
$tpl_vars[$username];
and then make a mysql request to get the id.

but is there a quicker way ?

I would like to know too if it is possible to set frontend user properties in a tag

thinks for your help

++ PG
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: user defined tag & frontend user

Post by calguy1000 »

try just {$username} it should work.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
donnut

Re: user defined tag & frontend user

Post by donnut »

Do you mean I can use {$username} in a User Defined Tag? I can not get it to work. I also tried echo $username, but that does not work either.

I'm trying to make something like the VisitorStats module, extended with the $username, or preferably one of the user properties.
Post Reply

Return to “Developers Discussion”