Welcome Guest, Not a member yet? Register   Sign In
Hiding Views
#7

[eluser]nuwanda[/eluser]
You need to test if the user is an admin.

Your admin controller will need to contain that check. If not admin, redirect to somewhere else.

In the controller's constructor you have something like:

Code:
if(!$user_role == 'admin'){
      redirect('site');
    }

This implies that when the user logged in, you set a role for that user. Then you check the role.


Messages In This Thread
Hiding Views - by El Forum - 11-05-2010, 12:29 PM
Hiding Views - by El Forum - 11-05-2010, 01:26 PM
Hiding Views - by El Forum - 11-05-2010, 02:19 PM
Hiding Views - by El Forum - 11-05-2010, 04:13 PM
Hiding Views - by El Forum - 11-05-2010, 05:21 PM
Hiding Views - by El Forum - 11-06-2010, 02:10 AM
Hiding Views - by El Forum - 11-10-2010, 02:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB