In my app_controller I have the following
function beforeFilter() {
...
if ($this-Auth-user()) {
$this-__authExtra();
App::import('Model', 'User');
User::store($this-Session-read('Auth'));
} else {
$this-Session-del('Auth.Person');
}
...
}
// The App::import ad
See if this works.
AppController:
function beforeFilter()
{
parent::beforeFilter();
$this-Auth-fields = array(
...
);
$this-Auth-loginAction = array(
...
);
/* set the redirect for post-login
*/
Well basically I have over a thousand products and I'll be assigning a
price modifier per group (ie Bronze Silver and Gold members have
different prices for their items), so I would think the best way would
be to check the User's Group's price_modifier when the user logs in,
and store it in the
Hi I have a setup with Users and Groups.
I've been reading user data using this in my views:
$session-read('Auth.User.full_name'); ..etc
Now I need to access information about the group of the user. How can
I go about doing this?
Check out the new CakePHP Questions site http://cakeqs.org and
Auth component only stores values that are in the users table, so you
can grab the user id using $this-Auth-user('id') and then do a find.
Or alternatively you can use $this-Auth-login and once if it
successfully logs in then do a find on the group data and store it in
the session for later use