mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 17:48:43 +02:00
Add $bAllowDefaultPicture parameter to UserRights::GetContactPictureAbsUrl() to return null instead of the default picture
This commit is contained in:
@@ -224,11 +224,18 @@ class NavigationMenu extends UIBlock
|
||||
*/
|
||||
protected function ComputeUserData()
|
||||
{
|
||||
// Use a picture set in the preferences is there is none in the user's contact
|
||||
$sPictureUrl = UserRights::GetContactPictureAbsUrl('', false);
|
||||
if(empty($sPictureUrl))
|
||||
{
|
||||
$sPictureUrl = utils::GetAbsoluteUrlAppRoot().'images/user-pictures/' . appUserPreferences::GetPref('user_picture_placeholder', 'user-profile-default-256px.png');
|
||||
}
|
||||
|
||||
//Todo : what do we show if no contact is linked to the user ?
|
||||
$aData = [
|
||||
'sOrganization' => UserRights::GetContactOrganizationFriendlyname(),
|
||||
'sFirstname' => UserRights::GetContactFirstname(),
|
||||
'sPictureUrl' => UserRights::GetContactPictureAbsUrl(),
|
||||
'sPictureUrl' => $sPictureUrl,
|
||||
'sWelcomeMessage' => Dict::Format('UI:Layout:NavigationMenu:UserInfo:WelcomeMessage:Text', UserRights::GetContactFirstname())
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user