mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-01 08:00:47 +08:00
[Legacy] Add 'show_fullname' option
This commit is contained in:
parent
6c8d45e914
commit
15b5e8aa6e
3 changed files with 8 additions and 1 deletions
|
@ -57,6 +57,12 @@ class AssignedUserMapper implements FieldMapperInterface
|
|||
}
|
||||
|
||||
$container[$name] = get_user_name($bean->assigned_user_id);
|
||||
|
||||
$assignedUser = BeanFactory::getBean('Users', $bean->assigned_user_id);
|
||||
|
||||
if (!empty(showFullName())) {
|
||||
$container['full_name'] = $assignedUser->full_name ?? '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1134,7 +1134,7 @@ function showFullName()
|
|||
$sysPref = !empty($sugar_config['use_real_names']);
|
||||
$userPref = (is_object($current_user)) ? $current_user->getPreference('use_real_names') : null;
|
||||
|
||||
if ($userPref != null) {
|
||||
if ($userPref != null && $userPref != 'off') {
|
||||
$showFullName = ($userPref == 'on');
|
||||
} else {
|
||||
$showFullName = $sysPref;
|
||||
|
|
|
@ -1027,6 +1027,7 @@ class User extends Person implements EmailInterface
|
|||
$cacheManager->markAsNeedsUpdate('app-metadata-user-preferences-'.$this->id);
|
||||
$cacheManager->markAsNeedsUpdate('app-metadata-language-strings-'. ($_POST['language'] ?? '') ?? $_SESSION['authenticated_user_language']);
|
||||
$cacheManager->markAsNeedsUpdate('app-metadata-theme-images');
|
||||
$cacheManager->markAsNeedsUpdate('rebuild_all');
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue