CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 login and security

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message
rkiss

Posts: 14
Posted: 11/05/2004, 4:56 AM

Michael,

thanks so much.

R
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.