Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6088519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:59:39+00:00 2026-05-23T11:59:39+00:00

I followed the CakePHP Cookbook’s simple ACL application tutorial and for a while all

  • 0

I followed the CakePHP Cookbook’s simple ACL application tutorial and for a while all way fine and dandy. When I created a user, my AROs were automagically created too, and without too much effort I was able to give everyone permissions for the correct actions.

My application has become more complex now though. When I create a “Realtor”, I create a user for them in the Realtor model’s afterSave function, like so:

App::import( 'Component', 'Auth' );
  $this->Auth = new AuthComponent();

  $this->User->create();
  $this->User->set(array(
    'username' => $this->data['Realtor']['email'],
    'password' => $this->Auth->password($this->data['Realtor']['password']),
    'usergroup_id' => 2,
    'realtor_num' => $this->id
  ));
  if ($this->User->save()) {
    $this->save(array('user_id'=>$this->User->id));
  } else { 
    //error 
  }

Unfortunately, while this is successfully creating users, and the data all seems to match up with my expectations, I’m seemingly no longer getting AROs.

My Usergroup model contains the line

var $actsAs = array('Acl' => array('type' => 'requester'));

Beyond that, I have no idea how I would persuade my application to generate an ARO.
Is there anything I could have forgotten, that would help me get my ACL back on track?

EDIT:

I had this in the User model’s afterSave which seems to have been causing various kinds of trouble:

function afterSave($created) {
    if (!$created) {
        $parent = $this->parentNode();
        $parent = $this->node($parent);
        $node = $this->node();
        $aro = $node[0];
        $aro['Aro']['parent_id'] = $parent[0]['Aro']['id'];
        $this->Aro->save($aro);
    }
}

(courtesy of this article: http://mark-story.com/posts/view/auth-and-acl-automatically-updating-user-aros) I don’t know if that would have been fouling up my ARO creation somehow… probably teach me to add in random code snippets without fully understanding what they’re doing, at the very least!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:59:40+00:00Added an answer on May 23, 2026 at 11:59 am

    Ok I’ m newbie
    I can’t understand your problem but
    now I use Acl component with alaxos acl plugin
    I try to understand of modified tree traversal algorithm
    and set basic data for aro,aco,aro_aco,group table
    and some requirement of plugin
    I suggest you to use this

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've followed the tutorial here: http://book.cakephp.org/view/1286/Sending-a-basic-message , which I have successfully used before with
I'm a new CakePHP user. I developed an application with CakePHP 1.3.5 that works
I've just been following the tutorial on the CakePHP website to create a simple
Followed the simple tutorial from here Settings of Bespin embedded? But cannot figure a
I followed this tutorial to create multilingual site. http://nuts-and-bolts-of-cakephp.com/2008/11/28/cakephp-url-based-language-switching-for-i18n-and-l10n-internationalization-and-localization/ However although I can get
I followed this tutorial on configuring the Rails plugin ExceptionNotifier. I know that I
I followed the commonly-linked tip for reducing an application to the system tray :
I've followed this otherwise excellent tutorial on getting Xen working with Ubuntu but am
I have followed all the instructions here: http://www.tonyspencer.com/2003/10/22/curl-with-php-and-apache-on-windows/ to install & config apache get
I have a simple cakephp app with table articles that has a cat_id column

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.