Kayako logo
SupportSuite, eSupport and LiveResponse Discussion, troubleshooting and feedback related to Kayako's flagship support desk products SupportSuite, eSupport and LiveResponse.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1) Old
jptimone Offline
New Member
 
Posts: 15
Join Date: Mar 2006
Location: Kuopio, Finland
Changing template after login with "usergroupid"? - 27-09-2006, 11:07 AM

My goal is to make such a system that changes the template after user has logged in by identifying "User group".

First thing I would like to know, how can I view in what usergroup some user belongs within template?
   
Reply With Quote
  (#2) Old
eiden Offline
Member
 
Posts: 237
Join Date: Apr 2006
Location: Norway
27-09-2006, 12:57 PM

Is this what you are looking for?

Code:
<{foreach key=key value=item from=$_USER}>
	<{$key}> - <{$item}> <br>
<{/foreach}>

<{foreach key=key value=item from=$tgroup}>
	<{$key}> - <{$item}> <br>
<{/foreach}>
You can access the variables like this:
Code:
<{$tgroup[guestusergroupid]}>
<{$tgroup[regusergroupid]}>
<{$tgroup[title]}>
This one is also handy:
Code:
<{if $_USER[loggedin] == true}>
<{/if}>

Last edited by eiden; 27-09-2006 at 01:14 PM.
   
Reply With Quote
  (#3) Old
jptimone Offline
New Member
 
Posts: 15
Join Date: Mar 2006
Location: Kuopio, Finland
28-09-2006, 07:01 AM

Quote:
Originally Posted by eiden
Is this what you are looking for?

Code:
<{foreach key=key value=item from=$_USER}>
	<{$key}> - <{$item}> <br>
<{/foreach}>

<{foreach key=key value=item from=$tgroup}>
	<{$key}> - <{$item}> <br>
<{/foreach}>
You can access the variables like this:
Code:
<{$tgroup[guestusergroupid]}>
<{$tgroup[regusergroupid]}>
<{$tgroup[title]}>
This one is also handy:
Code:
<{if $_USER[loggedin] == true}>
<{/if}>
Thanks eiden! Just the right information I was looking for. I ask more later on if I cannot make the modifications.
   
Reply With Quote
  (#4) Old
jptimone Offline
New Member
 
Posts: 15
Join Date: Mar 2006
Location: Kuopio, Finland
28-09-2006, 08:36 AM

OK, continuing this variable questions...

How can I find out usergroup title? I mean thru some variable rather than comparing e.g.
Code:
if ($USER[usergroupid] == 1) 
  echo "You belong usergroup: Sales";
elseif
...
   
Reply With Quote
  (#5) Old
eiden Offline
Member
 
Posts: 237
Join Date: Apr 2006
Location: Norway
28-09-2006, 08:47 AM

Quote:
Originally Posted by jptimone
OK, continuing this variable questions...

How can I find out usergroup title? I mean thru some variable rather than comparing e.g.
Code:
if ($USER[usergroupid] == 1) 
  echo "You belong usergroup: Sales";
elseif
...
The correct syntax would be:

Code:
<{if $_USER[usergroupid] eq 1}>
.. show something..
<{/if}>
I can't see that the usergrouptitle are available through the templates.

Last edited by eiden; 28-09-2006 at 08:50 AM.
   
Reply With Quote
Reply

Tags
template, usergroupid

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free Create links in ticket emails that auto login and go to the ticket khoffman Modifications & Addon Releases 41 11-04-2008 03:04 AM
Changing the template email_autoresponder jk2001 SupportSuite, eSupport and LiveResponse 5 01-03-2006 04:15 PM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46