Fix must use photo of user

This commit is contained in:
Laurent Destailleur
2017-09-17 17:29:00 +02:00
parent fc7d27c75c
commit fa18e788b5
2 changed files with 5 additions and 6 deletions

View File

@@ -851,7 +851,8 @@ class ActionComm extends CommonObject
}
/**
* Load all objects with filters
* Load all objects with filters.
* WARNING: This make a fetch on all records instead of making one request with a join.
*
* @param DoliDb $db Database handler
* @param int $socid Filter by thirdparty

View File

@@ -250,12 +250,10 @@ class FormActions
}
print '</td>';
print '<td>';
if (! empty($action->author->id))
if (! empty($action->userownerid))
{
$userstatic->id = $action->author->id;
$userstatic->firstname = $action->author->firstname;
$userstatic->lastname = $action->author->lastname;
print $userstatic->getNomUrl(1, '', 0, 0, 16, 0, '', '');
$userstatic->fetch($action->userownerid); // TODO Introduce a cache on users fetched
print $userstatic->getNomUrl(-1, '', 0, 0, 16, 0, '', '');
}
print '</td>';
print '<td align="right">';