• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create Admin Section in CodeIgniter Project?

#1
Hi all, 

I have created a simple project in CI. Now I want to create users and Admins. How to create an area only admin can login and modify data? Should I create an ADMIN Folder in APPLICATION folder and install another CI in it?
Reply

#2
Quote:Should I create an ADMIN Folder in APPLICATION folder and install another CI in it?

I certainly wouldn't do that. You can create an admin controller, containing the functions for modifying data (in your database).
Make sure you have a login procedure that forces you to log in when you access the admin controller. Let the constructor of the admin controller check if you're logged in as admin or not.
You can develop your own authentication system, but you really don't need to. There are various authentication libraries for CI, like Ion_auth and Community_auth.
Reply

#3
I just create an Admin Controller and view folders.

In all of the Admin Controllers do a check to make sure that the user is an Admin.
What did you Try? What did you Get? What did you Expect?

Joined the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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