Not inserting a ACL Role using ACL Role API
Overview
I was trying to assigning a new Users to CiviCRM ACL role through ACL Role API, but it is not showing me in database.
Reproduced on https://demo.tadpole.cc/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fapi3#explorer
Reproduction steps
Input ` $result = civicrm_api3('AclRole', 'create', [ 'debug' => 1, 'sequential' => 1, 'acl_role_id' => 14, 'entity_table' => "civicrm_group", 'entity_id' => 54, 'is_active' => 1,
]);`
Output
"values": [ { "id": "14", "acl_role_id": "", "entity_table": "civicrm_group", "entity_id": "54", "is_active": "1" } ]
I verified that "acl_role_id": 15 and civicrm_group 54 do exist.
Current behaviour
I don't see any new entries at https://demo.tadpole.cc/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Facl%2Fentityrole&reset=1
Expected behaviour
new entry at https://demo.tadpole.cc/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Facl%2Fentityrole&reset=1
Environment information
- Browser: Google Chrome Version 90.0.4430.212 (Official Build) (64-bit)
- CiviCRM: Powered by CiviCRM 5.37.2.
- PHP: PHP version 7.3.27
- CMS: _WordPress.Version 5.5.5