this is how im doing my check

if (!empty($this->params[CAKE_ADMIN])){
                $user = $this->Session->read('User');
                $result = $this->User->findByUsername($user['username']);
                //print_r($result['User']['user_level']);
                        //$user = $this->Entry->User->read(null, $user['id']);
                        if ($result['User']['user_level'] <> 'admin') {
                                $this->Session->setFlash('Access Denied.');
                                $this->redirect('/');
                        }
                        // set our layout based on admin routing vars
                        $this->layout = "admin";

as you said im using params, how can i modify to also trap the manual
route?

thnx


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to