Getting AclManager to Work with a Users Plugin
I'm trying to use AclManager with the CakeDC Users plugin. I've tried entering this in the plugin's bootstrap file:
Configure::write('AclManager.aros', array('Group', 'Users.User'));
That gives nothing but errors, most notably including:
Warning (2): Invalid argument supplied for foreach() [APP\Plugin\AclManager\Controller\AclController.php, line 31]
Warning (2): Invalid argument supplied for foreach() [APP\Plugin\AclManager\Controller\AclController.php, line 39]
I also tried it without referencing the plugin as in:
Configure::write('AclManager.aros', array('Group', 'Users.User'));
That gave the same errors.
The error you're showing does not seem linked to using a plugin. Please ensure that your settings are fully loaded first.
See step 5 of the installation instructions.
Thanks so much for that bit of assistance. The entry in my app/config/bootstrap file looks like this:
CakePlugin::load(
array(
'Users.Users', array('routes' => TRUE),
'Utils.Sluggable',
'ClearCache',
'AclExtras',
'AclManager', array('bootstrap' => TRUE),
)
);
The entry in the plugin's bootstrap file looks like this:
Configure::write('AclManager.aros', array('Group', 'Users.User'));
Actually, it seems like that last entry is causing the problems. I've also tried it in the following ways:
Configure::write('AclManager.aros', array('Group', 'Users/User'));
Configure::write('AclManager.aros', array('Group', 'User'));
The first one produces the same type of error. The second one just can't find the model.
Sorry for not getting back to you earlier. Have you found a solution to this?
Sorry, I had to move on to some other things, and am only now getting back to this. I have not found any solution. For some reason, this plugin just won't work. I have followed every instruction in the installation directions down to the letter, and I still get this same set of errors relating to "foreach ($aros as $aro)"
Hey!
I got Same error. Any solution please.
Warning (2): Invalid argument supplied for foreach() [APP/Plugin/AclManager/Controller/AclController.php, line 32]
Warning (2): Invalid argument supplied for foreach() [APP/Plugin/AclManager/Controller/AclController.php, line 40]
It is not able to read 'AclManager.models', do we manually set it to plugin's botstrap file?
My Settings: Configure::write('AclManager.aros', array('Group', 'User'));