Hi Bakers!  Cake newbie here and I really need some help.  I've read
the manual and gone through the posts here and I'm just missing
something.

I have a login element created that is rendered from my default
layout.  I am calling the element this way:
<?php echo $this->renderElement('login',array("mini_user",$user)); ?>

That part is sorta working because the element is being called.

I have a FormsController (which is playing traffic cop for the various
forms I need to create) and in the beforeFilter() I am attempting to
call an action from my UsersController like this:

        function beforeFilter() {
                if(!$this->Session->check('User')) {
                        $this->redirect('/users/login');
                        exit;
                }
                //parent::beforeFilter();  // for later if anything gets moved 
to
the AppController
                if ($this->Session->check('User')) {
                        $sess_user = $this->Session->read('User');
                        $this->requestAction('/users/miniView/' . 
$sess_user['User']
['id']);
                }
        }

The UserController action looks like this:
        function miniView($id = null) {
                if(!$id) {
                        $this->Session->setFlash('Invalid id for User.');
                        $this->redirect('/users/index');
                }
//debug($this->User->read(null, $id));
                $this->set('mini_user', $this->User->read(null, $id));
        }

I have debugged the fool out of this thing and know that the data I
need is there except I get an undefined variable in the debug stmts in
my FormsController, in the default layout and in the element.

Any help would be much appreciated!  I'm getting a bruise from banging
my head on my desk.

Please let me know if you need more code snippets or information.
Love to bake!  What a great tool!


--~--~---------~--~----~------------~-------~--~----~
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