
wcboyd
Posts: 46
|
| Posted: 02/06/2008, 9:43 AM |
|
Hello All,
I am trying to figure out how to send those who belong to the "user" group to pageA.html or if they belong to "admin" group send them to pageb.html.
I know how to do a single static redirect at login, but this conditional thing has me stuck.
I have searched the forums and there does not seem to be a clearly defined way to do this.
<edit> Ideally, I would like to drive the page they are being redirected to by a field in the group table called "homepage", for the sake of argument.
Any ideas anyone?
_________________
Thanks,
Craig
"Stress is the body's way of saying you have not worked enough unpaid overtime." ~ Scott Adams |
 |
 |
waqasaltaf
Posts: 37
|
| Posted: 02/06/2008, 12:28 PM |
|
hi..
try this
Put the following custom code in the before show event of your redirect page.
//Custom Code @2-1360E090
if(CCGetSession("GroupID") == "")
{
header("Location: login.php");
}
elseif (CCGetSession("GroupID") == 1)
{
header("Location: group_one.php");
}
elseif(CCGetSession("GroupID") == 2)
{
header("Location: group_two.php");
}
//End Custom Code
what i did was create a page say pg2 and put this code in that page
i redirected the login page to this page and then this script will do the rest.
|
 |
 |
wcboyd
Posts: 46
|
| Posted: 02/06/2008, 2:03 PM |
|
That does the trick nicely!
_________________
Thanks,
Craig
"Stress is the body's way of saying you have not worked enough unpaid overtime." ~ Scott Adams |
 |
 |
|

|
|
|
|