rkiss
Posts: 14
|
Posted: 11/04/2004, 4:14 PM |
|
Hi, I am a little confused on how the login functionality works.
I have an authen.. table with the following attributes:
user_id
first_name
last_name
username
password
email
group_id
I have 4 different kinds of user levels (group_id). Now when each user level logs in, he/she should be redirected to the appropriate web page, based on his/her user level. Can I accomplish this with CCS?
Any tip/help is appreciated.
Thanks
R
|
|
|
mrachow
Posts: 509
|
Posted: 11/05/2004, 12:54 AM |
|
For this I placed custom code under servers OnClick event (after doing Login of course).
global $Redirect;
if((CCGetGroupID() == 1) && (CCGetFromGet("ret_link", "") == ""))
$Redirect = "Level1Page.php";
if((CCGetGroupID() == 2) && (CCGetFromGet("ret_link", "") == ""))
$Redirect = "Level2Page.php";
aso
The Check for the redirect page results form CCS behaviour while moving around the pages of a web site.
You click around and only if you arrive on a page that needs login or a higher/different access level you where routed to login. So you already have had a wish what to see or to do when ariving at the login page. After Login you will be redirect to that page. Only if you come directly to Login you will be routed accordingly to your GroupID.
If your web site do login at very first you can always route your users accordingly to the GroupID. So you wouldn't need that second check for a page for redirect.
Regards,
Michael
_________________
Best regards,
Michael |
|
|
rkiss
Posts: 14
|
Posted: 11/05/2004, 4:56 AM |
|
Michael,
thanks so much.
R
|
|
|
|