Page 1 of 1

$isuserbackendconnected in templates ?

Posted: Wed Apr 21, 2010 7:48 pm
by zabelle_motte
Hello CMSMS friends,

I am searching the doc and forums for the all day and still scratching my head for a way to have a conditionnal presentation is a template switching on a kind of $isuserbackendconnected  event (detecting if one user is connected to backend interface).

It seems not to exist.
The Frontend User Extension is not the solution fot me because I only wanna have to manage backend users.

I suppose this information is stored in a session variable but I did not find any clear information about it. (Any place to look ?)

I do not know if it is possible to catch a session variable in a smarty block. I found the "$smarty.session" variable but, no succeeding use.

Finally if none of these possibilities work, I found an other solution : to build a user defined tag in php that creates a contitionnal block. Something like that :

Code: Select all

if ($isuserbackendconnected)
call block 1
else
call block2
Please let me know any way (in smarty or in php) to tell $isuserbackendconnected event.

Thanks in advance for any help or suggestion ...

Zabelle

Re: $isuserbackendconnected in templates ?

Posted: Wed Apr 21, 2010 9:02 pm
by jmcgin51
how about using get_userid()

If the user is not logged in to the backend, there won't be a userid

Re: $isuserbackendconnected in templates ?

Posted: Thu Apr 22, 2010 7:21 am
by zabelle_motte
I had a rapid look on the subjects concerning the get_userid function and it seems promissing.

Thanks a lot for this suggestion.

I will investigate this evening.

Zabelle