Reputation: 21449
I've got a small question about Creating Aro-s in Cakephp
http://book.cakephp.org/#!/view/1547/Acts-As-a-Requester
I'm using code provided in cake-s tutorial (see the link), the problem is that alias for the aro-s are not set. how can this be achieved?
Upvotes: 1
Views: 845
Reputation: 21
Add something like this in your User Model.
public function afterSave() {
$this->Aro->save(array('alias'=>$this->data[$this->alias]['name']));
}
Change 'name' by the fieldName you want to use as alias for the Aro. Same in the Group Model.
Saludos.
Upvotes: 2