From d740bdbc7385b595b33b388da71a6a6760fe37ae Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Fri, 3 Feb 2017 11:38:09 +0100
Subject: [PATCH] Fix #6365

---
 htdocs/api/class/api.class.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php
index 5ffae225df1..37843be90b9 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)) {
-- 
GitLab