i have one controller in which i have following function:
var $components = array('Acl');
function anyaction()
{
$aro =& $this->Acl->Aro;
//Here's all of our group info in an array we can iterate through
$groups = array(
0 => array(
'alias' => 'admin'
),
1 => array(
'alias' => 'doctor'
),
2 => array(
'alias' => 'staff'
),
3 => array(
'alias' => 'pharmacy'
),
);
//Iterate and create ARO groups
foreach($groups as $data)
{
//Remember to call create() when saving in loops...
$aro->create();
//Save data
$aro->save($data);
}
//Other action logic goes here...
}
when i ran this function i got Fatal error: Call to a member function
create() on a non-object...
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