mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-17 06:18:44 +02:00
Enable search for disabled users in log entries
This commit is contained in:
@@ -1345,12 +1345,12 @@ class UserRights
|
||||
* @return string
|
||||
* @throws \OQLException
|
||||
*/
|
||||
public static function GetUserFriendlyName($sLogin = '')
|
||||
public static function GetUserFriendlyName(string $sLogin = '', bool $bAllowDisabledUsers = false)
|
||||
{
|
||||
if (empty($sLogin)) {
|
||||
$oUser = self::$m_oUser;
|
||||
} else {
|
||||
$oUser = self::FindUser($sLogin);
|
||||
$oUser = self::FindUser($sLogin, 'any', $bAllowDisabledUsers);
|
||||
}
|
||||
if (is_null($oUser)) {
|
||||
return '';
|
||||
|
||||
@@ -653,7 +653,7 @@ HTML
|
||||
if (false === empty($iEntryUserId)) {
|
||||
$oEntryUser = MetaModel::GetObject('User', $iEntryUserId, false /* Necessary in case user has been deleted */, true);
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user