Well, you don't have a column group_id in your users table; you have a column superuser. So did you try:
if ($session->read('Auth.User.superuser') == 1) { .... } On Feb 23, 2011, at 21:22, Kid Hell wrote: > thank you for your reply..but i still can't get it right.. I'm a slow > learner. Can you please explain deeper on the (Auth.User.group_id') part. > > this is what the table in db looks like > > id usrname > pass superuser > > 1 jill > 12345 1 > 2 john > 54321 0 > 3 kurt 32145 > 0 > > > > > > On Wed, Feb 23, 2011 at 7:42 PM, Stephen wrote: > >> $session->read('Auth.User.column'); >> >> You can access the user's record from within a view like the above, so as >> long as your group is specified in the user record (say ... group_id) >> >> if($session->read('Auth.User.group_id') == 'superuser') { >> .... >> } >> >> >> **** This assumes you are using the Auth component. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php