N°2847 Handle no contact linked to user on usr menu icon hover

This commit is contained in:
Stephen Abello
2020-08-04 14:44:42 +02:00
parent 2db7611368
commit 18b653f641
2 changed files with 24 additions and 1 deletions

View File

@@ -213,6 +213,7 @@ class NavigationMenu extends UIBlock
*/
protected function ComputeUserData()
{
//Todo : what do we show if no contact is linked to the user ?
$aData = [
'sOrganization' => UserRights::GetContactOrganizationFriendlyname(),
'sFirstname' => UserRights::GetContactFirstname(),
@@ -222,7 +223,8 @@ class NavigationMenu extends UIBlock
// Logon message
$sLogonMessageDictCode = (UserRights::IsAdministrator()) ? 'UI:LoggedAsMessage+Admin' : 'UI:LoggedAsMessage';
$aData['sLogonMessage'] = Dict::Format($sLogonMessageDictCode, UserRights::GetContactObject()->Get('friendlyname'));
$aData['sLogonMessage'] = Dict::Format($sLogonMessageDictCode, UserRights::GetContactFriendlyname());
$this->aUserData = $aData;