This topic is locked

Redirect after login

11/2/2010 18:58:08
PHPRunner General questions
D
DouglasB author

So a simple page redirect is simple after log in, but suppose you want to do a redirect after log in depending on permissions of that login?
So a Contractor logs in and I want him to go to the Advance Search Page for Contractor View.

An Agency logs in and I want to take them to the Advance Search for the Agency View.

The ADMIN logs in and I want to take him to the Mane Menu page.

If someone logs in as a "Guest" I take them to the Guest View, which works fine.
So how do I set these three conditions in my Actions AFTER Login?

Sergey Kornilov admin 11/3/2010

In pseudocode:

if (user is Contractor)

redirect to contractorpage;

else if (user is Agency)

redirect to agencypage;

else

redirect somewhereelse;


The actual code depends on how you distinguish between different user types.