I login, then want to check the session if a person has admin rights
If I login as an 'admin' where the role = admin or if I login as a non-
admin where the role=0, it displays in both situations the admin area
link...
the script: if ($session->check('Auth.User.role') == 'admin') {
echo $html->link('Admin Area', '/admin/');
} else {
echo $html->link('My Account', '/accnt/');
}
In the debug the 'role' is set to '0'
in the debug I get :
[Auth] => Array
(
[User] => Array
(
[id] => 3
[username] => gab
[fname] =>
[lname] => sdf
[email] => [EMAIL PROTECTED]
[tell] => sdf
[cell] =>
[hnum] =>
[street] =>
[city] => 0
[county_id] => 0
[country_id] => 0
[pcode] =>
[maillist] => 0
[created] => 2008-10-01 13:52:50
[role] => 0
[ip] =>
[lastvisit] => 0000-00-00 00:00:00
[emailssend] => 0
[browser] => 0
[screen] =>
)
)
any help
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---