From e369d5dfd8efbf723036f4ca39f1146612f44669 Mon Sep 17 00:00:00 2001 From: fhenry Date: Wed, 9 Jan 2013 20:34:36 +0100 Subject: [PATCH] Fix [ bug #668 ] Event created with a profile is not visible by the same profile --- htdocs/comm/action/fiche.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index b0c01cdd9f4..bb2eb7dce35 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -555,7 +555,13 @@ if ($action == 'create') } else { - print $form->select_company('','socid','',1,1); + //For external user force the company to user company + if (!empty($user->societe_id)) { + print $form->select_company($user->societe_id,'socid','',1,1); + } else { + print $form->select_company('','socid','',1,1); + } + } print '';