• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Login system

#1
[eluser]elmne[/eluser]
I want to create a login system for administrators and another for users.

All controllers usable by administrators are in one folder, "administrator"

All controllers usable by users are in one folder "user"


Can someone please guide me to the best and simplest implementation of login for this?

So that when a user click on a link to the administrator folder, they should be directed to the login page if they are not logged in, otherwise, the function index() for the administrator loads as each folder has a homepage controller with constructor and index.

But if not logged in, user is directed to login, then directed back to index once login is validated.

The same should happen to the "user" folder"


Most examples of logins i have seen seem to require changing routers and all other stuff which would not be applicable in this situation

#2
[eluser]Amzad Hossain[/eluser]
http://philsturgeon.co.uk/news/2010/02/C...ing-it-DRY

Read this article carefully. the solution lies in there . Instead of putting controllers in separate folder use Extending Admin_controller or Public_controller .


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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