diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 9951902ec5b..43f7f9f19ab 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -375,10 +375,13 @@ if ($id > 0 || ! empty($ref))
print '
';
print img_object('','user','class="hideonsmartphone"');
$contactsoftask=$object->getListContactId('internal');
- if (count($contactsoftask)>0) {
+ if (count($contactsoftask)>0)
+ {
$userid=$contactsoftask[0];
- print $form->select_dolusers($userid,'userid',0,'',0,'',$contactsoftask);
- }else {
+ print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid),'userid',0,'',0,'',$contactsoftask);
+ }
+ else
+ {
print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
}
print ' | ';