diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 5ffae225df1b92d3361d6ac066b58dd9907a1596..37843be90b90ba02fa0c7a39a0400ed3f35542ab 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -170,7 +170,10 @@ class DolibarrApi * @throws RestException */ static function _checkAccessToResource($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') { - + + // For backward compatibility + if ($resource == 'member') $resource='adherent'; + // Features/modules to check $featuresarray = array($resource); if (preg_match('/&/', $resource)) {