CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 CCS : User redirection based on user level

Print topic Send  topic

Author Message
Simon
Posted: 09/03/2002, 8:27 AM

I have been trying to make a user redirection based on user level according
to a post in this forum.

But without success. :(

On my Login page i set "Return Page" to my "redirect_user" page, that
have the following custom code.

function Page_BeforeShow() { //Page_BeforeShow @1-66DC429C

if (CCGetSession("GroupID") == 16)
header("Location: profil.php");

else

if (CCGetSession("GroupID") == 4096)
header("Location: admin.php");

else

header("Location: login.php");

But when logging in with correct username and password i just get redirected to the login page, and the browser url is showing:

http://www.somedomain.com/Login.php?ret_link=profil.php&type=notLogged

Any suggestions ?
Simon
Posted: 09/03/2002, 6:46 PM

Ok, found the bug....

My Logout link, logged out the user automaticaly since i had placed a logout code "before show", and since it was set as footer, all pages logged out...

So check your logout links if you have problems with the type=notLogged.

Also, login problems can be if you have forgotten to specify a primary key in your database. (also happened to me...) Yes, I am a beginner.. :)

   


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.