mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 23:32:17 +02:00
Enable search for disabled users in log entries
This commit is contained in:
@@ -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 '';
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user