Hello everyone,
I just learn cakephp and I'm having trouble creating the admin section
of my app.
These are what I've done so far.
1. I've created a user section with the capabilities of login/logout
and signup.
2. I've created a "users" table for it.
3. I've overriden the app_controller and define the Auth component.
I've also
created its' own beforeFilter() function.
Here is a snippet of my app_controller.php code:
<?php
class AppController extends Controller {
var $components = array('Auth');
function beforeFilter()
{
$this->Auth->loginRedirect = array('controller' => 'mainpage',
'action' => 'home');
$this->Auth->logoutRedirect = array('controller' => 'mainpage',
'action' => 'home');
$this->Auth->allow('signup','home');
$this->Auth->authorize = 'controller';
$this->set('loggedIn', $this->Auth->user('id'));
}
function isAuthorized()
{
return true;
}
}
?>
Now, i've decided to create an admin section that could
edit,view,delete users.
I've created a separate table for the admin, namely, "admins" table.
I've also
created its' own model,view, and controller.
Now I'm stuck in implementing the admins' login/logout feature because
my main problem
is that the app_controller that I made is already "specific" to my
user's controller.
Please advise me on what to do.
Thanks,
Mario
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---