diff --git a/htdocs/core/ajax/loadinplace.php b/htdocs/core/ajax/loadinplace.php
index 831f3c5dea85885b7a547733f482d5dd2571b420..82c84e7e18f207fa5a9462ff66d35d49ad6f71af 100644
--- a/htdocs/core/ajax/loadinplace.php
+++ b/htdocs/core/ajax/loadinplace.php
@@ -50,16 +50,17 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($
 	$field			= substr($field, 8); // remove prefix val_
 	$type			= GETPOST('type','alpha');
 	$loadmethod		= (GETPOST('loadmethod','alpha') ? GETPOST('loadmethod','alpha') : 'getValueFrom');
-	
+
 	if ($element != 'order_supplier' && $element != 'invoice_supplier' && preg_match('/^([^_]+)_([^_]+)/i',$element,$regs))
 	{
 		$element = $regs[1];
 		$subelement = $regs[2];
 	}
-	
+
 	if ($element == 'propal') $element = 'propale';
 	else if ($element == 'fichinter') $element = 'ficheinter';
 	else if ($element == 'product') $element = 'produit';
+	else if ($element == 'member') $element = 'adherent';
 	else if ($element == 'order_supplier') {
 		$element = 'fournisseur';
 		$subelement = 'commande';
@@ -68,7 +69,7 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($
 		$element = 'fournisseur';
 		$subelement = 'facture';
 	}
-	
+
 	if ($user->rights->$element->lire || $user->rights->$element->read
 	|| (isset($subelement) && ($user->rights->$element->$subelement->lire || $user->rights->$element->$subelement->read))
 	|| ($element == 'payment' && $user->rights->facture->lire)
@@ -78,7 +79,7 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($
 		{
 			$methodname	= 'load_cache_'.$loadmethod;
 			$cachename = 'cache_'.GETPOST('loadmethod','alpha');
-			
+
 			$form = new Form($db);
 			if (method_exists($form, $methodname))
 			{
@@ -93,7 +94,7 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($
 					$module = $regs[1];
 					$subelement = $regs[2];
 				}
-				
+
 				dol_include_once('/'.$module.'/class/actions_'.$subelement.'.class.php');
 				$classname = 'Actions'.ucfirst($subelement);
 				$object = new $classname($db);
diff --git a/htdocs/core/ajax/saveinplace.php b/htdocs/core/ajax/saveinplace.php
index 8e32fe6551c5389bf4c27c1da0aa8d1dc2845e3d..da4642c19b881ec23ad2418fca85e1198ea8bdd4 100644
--- a/htdocs/core/ajax/saveinplace.php
+++ b/htdocs/core/ajax/saveinplace.php
@@ -69,6 +69,7 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($
 	if ($element == 'propal') $element = 'propale';
 	else if ($element == 'fichinter') $element = 'ficheinter';
 	else if ($element == 'product') $element = 'produit';
+	else if ($element == 'member') $element = 'adherent';
 	else if ($element == 'order_supplier') {
 		$element = 'fournisseur';
 		$subelement = 'commande';
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index ed1e6159e3b360686b105c254de5d75acc4cda62..1da457d9421ed58531f50457d6ca8e22f2d0db2a 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -1382,8 +1382,13 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
         $num=count($menu_array);
     	for ($i = 0; $i < $num; $i++)
         {
+        	$showmenu=true;
+        	if (! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) && empty($menu_array[$i]['enabled'])) {
+        		$showmenu=false;
+        	}
+
             $alt++;
-            if (empty($menu_array[$i]['level']))
+            if (empty($menu_array[$i]['level']) && $showmenu)
             {
                 if (($alt%2==0))
                 {
@@ -1418,11 +1423,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
                 {
                     print '<div class="menu_titre">'.$tabstring.'<a class="vmenu" href="'.$url.'"'.($menu_array[$i]['target']?' target="'.$menu_array[$i]['target'].'"':'').'>'.$menu_array[$i]['titre'].'</a></div>'."\n";
                 }
-                else if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED))
+                else if ($showmenu)
                 {
                     print '<div class="menu_titre">'.$tabstring.'<font class="vmenudisabled">'.$menu_array[$i]['titre'].'</font></div>'."\n";
                 }
-                print '<div class="menu_top"></div>'."\n";
+                if ($showmenu)
+                	print '<div class="menu_top"></div>'."\n";
             }
             // Menu niveau > 0
             if ($menu_array[$i]['level'] > 0)
@@ -1437,7 +1443,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
                     if (! strstr($menu_array[$i]['titre'],'<table')) print '<br>';
                     print '</div>'."\n";
                 }
-                else if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED))
+                else if ($showmenu)
                 {
                 	print '<div class="menu_contenu">'.$tabstring.'<font class="vsmenudisabled">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
                 }
@@ -1446,7 +1452,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
             // If next is a new block or end
             if (empty($menu_array[$i+1]['level']))
             {
-                print '<div class="menu_end"></div>'."\n";
+                if ($showmenu)
+                	print '<div class="menu_end"></div>'."\n";
                 print "</div>\n";
             }
         }
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index c162bfb4294d31f56c81d04079ea16277faf00a9..78b3bdf1d68d9e5f29243a4c425c2a02d7ed938f 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -512,7 +512,7 @@ class User extends CommonObject
 		$sql.= " FROM ".MAIN_DB_PREFIX."user_rights as ur";
 		$sql.= ", ".MAIN_DB_PREFIX."rights_def as r";
 		$sql.= " WHERE r.id = ur.fk_id";
-		$sql.= " AND r.entity IN (0,".(!empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")";
+		$sql.= " AND r.entity IN (0,".(! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")";
 		$sql.= " AND ur.fk_user= ".$this->id;
 		$sql.= " AND r.perms IS NOT NULL";
 		if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'";
@@ -557,11 +557,14 @@ class User extends CommonObject
 		$sql.= " ".MAIN_DB_PREFIX."usergroup_user as gu,";
 		$sql.= " ".MAIN_DB_PREFIX."rights_def as r";
 		$sql.= " WHERE r.id = gr.fk_id";
+		if (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)) {
+			$sql.= " AND gu.entity IN (0,".$conf->entity.")";
+		} else {
+			$sql.= " AND r.entity = ".$conf->entity;
+		}
 		$sql.= " AND gr.fk_usergroup = gu.fk_usergroup";
 		$sql.= " AND gu.fk_user = ".$this->id;
 		$sql.= " AND r.perms IS NOT NULL";
-		$sql.= " AND r.entity = ".$conf->entity;
-		$sql.= " AND gu.entity IN (0,".$conf->entity.")";
 		if ($moduletag) $sql.= " AND r.module = '".$this->db->escape($moduletag)."'";
 
 		dol_syslog(get_class($this).'::getrights sql='.$sql, LOG_DEBUG);
@@ -1418,7 +1421,7 @@ class User extends CommonObject
 		}
 		if (! empty($dolibarr_main_force_https)
 			|| (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on')) $urlwithouturlroot=preg_replace('/http:/i','https:',$urlwithouturlroot);
-		
+
 		// TODO Use outputlangs to translate messages
 		if (! $changelater)
 		{