diff --git a/addons/userrights/userrightsprofile.class.inc.php b/addons/userrights/userrightsprofile.class.inc.php index 244c8f92f9..62a70baeb7 100644 --- a/addons/userrights/userrightsprofile.class.inc.php +++ b/addons/userrights/userrightsprofile.class.inc.php @@ -82,8 +82,8 @@ class URP_Profiles extends UserRightsBaseClass function GetGrantAsHtml($oUserRights, $sClass, $sAction) { - $oGrant = $oUserRights->GetProfileActionGrant($this->GetKey(), $sClass, $sAction); - if (is_object($oGrant) && ($oGrant->Get('permission') == 'yes')) + $iGrant = $oUserRights->GetProfileActionGrant($this->GetKey(), $sClass, $sAction); + if (!is_null($iGrant)) { return ''.Dict::S('UI:UserManagement:ActionAllowed:Yes').''; }