Welcome Guest, Not a member yet? Register   Sign In
Where Store Admin Information?
#3

(This post was last modified: 04-29-2016, 06:19 AM by Wouter60.)

I recommend an authentication library for CI, like Ion Auth from Ben Edmunds. It comes with tables for users, groups and users_groups. And a lot of powerful functions in it's library.
Example:
PHP Code:
$this->ion_auth->is_admin(); 
This will return a boolean (true or false) to check if the current user is a member of the group "admin".

Also, you can check if a user is member of any other group, like this:
PHP Code:
$employee $this->ion_auth->in_group('employee'); 
Reply


Messages In This Thread
Where Store Admin Information? - by pb.sajjad - 04-28-2016, 12:22 PM
RE: Where Store Admin Information? - by CINewb - 04-28-2016, 12:39 PM
RE: Where Store Admin Information? - by Wouter60 - 04-29-2016, 06:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB