mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +02:00
Fix UserRights::GetUserId() when using optional $sLogin parameter
This commit is contained in:
@@ -1054,13 +1054,14 @@ class UserRights
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $sName
|
* @param string $sLogin
|
||||||
*
|
*
|
||||||
* @return string|null
|
* @return string|null
|
||||||
|
* @throws \OQLException
|
||||||
*/
|
*/
|
||||||
public static function GetUserId($sName = '')
|
public static function GetUserId($sLogin = '')
|
||||||
{
|
{
|
||||||
if (empty($sName))
|
if (empty($sLogin))
|
||||||
{
|
{
|
||||||
// return current user id
|
// return current user id
|
||||||
if (is_null(self::$m_oUser))
|
if (is_null(self::$m_oUser))
|
||||||
@@ -1072,7 +1073,7 @@ class UserRights
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// find the id out of the login string
|
// find the id out of the login string
|
||||||
$oUser = self::$m_oAddOn->FindUser($sName);
|
$oUser = self::FindUser($sLogin);
|
||||||
if (is_null($oUser))
|
if (is_null($oUser))
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user