• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to redirect to different user pages

#4
[eluser]Vheissu[/eluser]
The way I go about this is to first log them in and then set all of their relevant information in a session, usually called user_role and then put if they're an admin or user in there. Then I redirect them to the index function of my Auth controller and inside of that Auth controller index function I am checking if they're an admin or user.

Code:
class Auth extends Controller {
    
    function Auth()
    {
        parent:Controller();
        // Load libraries here etc
    }

    function index()
    {
        // Check if they're an admin or user and use redirect() to send them to their respective places
    }


}


Messages In This Thread
how to redirect to different user pages - by El Forum - 08-08-2010, 09:31 AM
how to redirect to different user pages - by El Forum - 08-08-2010, 10:41 AM
how to redirect to different user pages - by El Forum - 08-08-2010, 11:15 AM
how to redirect to different user pages - by El Forum - 08-08-2010, 08:27 PM
how to redirect to different user pages - by El Forum - 08-08-2010, 10:06 PM
how to redirect to different user pages - by El Forum - 08-08-2010, 11:47 PM
how to redirect to different user pages - by El Forum - 08-09-2010, 12:13 AM
how to redirect to different user pages - by El Forum - 08-09-2010, 12:14 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.