Welcome Guest, Not a member yet? Register   Sign In
Ion Auth edit admin - yes, edit user - refresh
#1

I have got the most of Ion Auth working on my site: login/logout, create user/view users. I got adventurous and separated the auth controller into two controllers: auth just contains non-admin functions and a new controller, admin, contains the admin functions. Each controller inherits a separate my_controller that checks for login and admin. I've removed the admin and login checks from the methods in the admin and auth controllers.

If you are with me so far: when I view the Ion Auth users (admin/index), I am able to edit the admin user (admin/edit_user/1), but when I click on any other user (admin/edit_user/2) it simply reloads the view users page (admin/index)

The problem seems to occur here:

if (!($this->ion_auth->user()->row()->id == $id))
{
redirect('admin', 'refresh');
}

$id equals 1, 2, or 3 depending on who I click on to edit
ion_auth->user()->row()->id   always equals 1    (which is equal to the admin user id)

Any advice would be much appreciated.
Reply


Messages In This Thread
Ion Auth edit admin - yes, edit user - refresh - by Shawn - 04-26-2015, 01:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB