fix: [internal] user add fix attempt #2
parent
82bf3a74c1
commit
d7bf8af5b1
|
@ -74,10 +74,11 @@ class UsersController extends AppController
|
|||
} else {
|
||||
$validRoles = $this->Users->Roles->find('list')->order(['name' => 'asc'])->all()->toArray();
|
||||
}
|
||||
$defaultRole = $this->Users->Roles->find()->select(['id'])->where(['is_default' => true])->first()->toArray();
|
||||
$defaultRole = $this->Users->Roles->find()->select(['id'])->where(['is_default' => true])->first();
|
||||
if (empty($defaultRole)) {
|
||||
$defaultRole = $this->Users->Roles->find()->select(['id'])->first()->toArray();
|
||||
$defaultRole = $this->Users->Roles->find()->select(['id'])->first();
|
||||
}
|
||||
$defaultRole = $defaultRole->toArray();
|
||||
$individuals = $this->Users->Individuals->find('list', $individuals_params)->toArray();
|
||||
$this->CRUD->add([
|
||||
'beforeMarshal' => function($data) {
|
||||
|
|
Loading…
Reference in New Issue