I'm finally braving the waters of auth/acl. I'm going from the
tutorial in the 1.3 cake docs.
Here's how I defined it:

modesl/user.php
class User extends AppModel {
   var $hasMany = array(
       'Owner' => array(
            'className' => 'Community',
            'foreignKey' => 'owner_id',
        ),
   );

models/community.php
class Community extends AppModel {
    var $belongsTo = array(
        'Owner' => array(
            'className' => 'User',
            'foreignKey' => 'owner_id',
        ),
    );


I made an additional association to the user model and called it
owner_id and ever since I've been getting his error:

Warning (512): Callback parentNode() not defined in Owner [CORE/cake/
libs/model/behaviors/acl.php, line 64]

================
I have a parentNode function in my user model (mindlessly copied from
the tutorial).

    function parentNode()
    {
        if (!$this->id && empty($this->data))
        {
            return null;
        }
        if (isset($this->data['User']['group_id']))
        {
            $groupId = $this->data['User']['group_id'];
        }
        else
        {
            $groupId = $this->field('group_id');
        }
        if (! $groupId)
        {
            return null;
        }
        else
        {
            return array('Group' => array('id' => $groupId));
        }
    }
==========

Any suggestions on how to make that warning message go away?  I'm
stumped.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to