What is the best way to handle Auth for users that belong to
completely seperate models/tables?
I have an Agent model & Client model, basically the Agent hasMany
Client and Client belongsTo Agent - The fields for each respective
model are radically different enough that they did indeed require
there own models.
Using CakePHP Auth component I know how and currently have Auth setup
for the Client model, but I dont know how to set it up to have the
Auth component also Handle the Agent model.
Is this a situation where the Auth component may not be the best
choice?
My current Auth code in my AppController beforeFilter() is....
$this->Auth->userModel = 'Client';
$this->Auth->fields = array('username' => 'email', 'password' =>
'password');
$this->Auth->loginAction = array('controller' => 'account', 'action'
=> 'login');
$this->Auth->loginRedirect = array('/');
$this->Auth->authorize = 'controller';
$this->Auth->deny("*");
$this->Auth->logoutRedirect = array('controller' => 'account',
'action' => 'login');
As an aside... When I login, it takes me back to the Login page even
on success, is there something up there that is foobaring the
redirect?
Also, whats the best way to handle possibly putting the Agent route/
pages on a subdomain so I would potentially end up with....
http://mydomain.com - Client area
http://agent.mydomain.com - Agent area (/agent - Route)
Thanks all
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---