From 703161157b39418291090cc2f0cc1997eb495ef3 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Tue, 11 Aug 2020 17:46:30 +0200 Subject: [PATCH] Fix UserRights::GetUserId() when using optional $sLogin parameter --- core/userrights.class.inc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/userrights.class.inc.php b/core/userrights.class.inc.php index 2755d42198..31a5d34c9e 100644 --- a/core/userrights.class.inc.php +++ b/core/userrights.class.inc.php @@ -1054,13 +1054,14 @@ class UserRights } /** - * @param string $sName + * @param string $sLogin * * @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 if (is_null(self::$m_oUser)) @@ -1072,7 +1073,7 @@ class UserRights else { // find the id out of the login string - $oUser = self::$m_oAddOn->FindUser($sName); + $oUser = self::FindUser($sLogin); if (is_null($oUser)) { return null;