Enable search for disabled users in log entries

This commit is contained in:
jf-cbd
2026-04-09 18:18:54 +02:00
parent 9f25635a64
commit f96a99de79
2 changed files with 3 additions and 3 deletions

View File

@@ -1345,12 +1345,12 @@ class UserRights
* @return string * @return string
* @throws \OQLException * @throws \OQLException
*/ */
public static function GetUserFriendlyName($sLogin = '') public static function GetUserFriendlyName(string $sLogin = '', bool $bAllowDisabledUsers = false)
{ {
if (empty($sLogin)) { if (empty($sLogin)) {
$oUser = self::$m_oUser; $oUser = self::$m_oUser;
} else { } else {
$oUser = self::FindUser($sLogin); $oUser = self::FindUser($sLogin, 'any', $bAllowDisabledUsers);
} }
if (is_null($oUser)) { if (is_null($oUser)) {
return ''; return '';

View File

@@ -653,7 +653,7 @@ HTML
if (false === empty($iEntryUserId)) { if (false === empty($iEntryUserId)) {
$oEntryUser = MetaModel::GetObject('User', $iEntryUserId, false /* Necessary in case user has been deleted */, true); $oEntryUser = MetaModel::GetObject('User', $iEntryUserId, false /* Necessary in case user has been deleted */, true);
if (!is_null($oEntryUser)) { if (!is_null($oEntryUser)) {
$sEntryUserLogin = UserRights::GetUserFriendlyName($oEntryUser->Get('login')); $sEntryUserLogin = UserRights::GetUserFriendlyName($oEntryUser->Get('login'), true);
} }
// Retrieve (and cache) profile picture if available (standard datamodel) // Retrieve (and cache) profile picture if available (standard datamodel)