Do not check if the organizations are allowed if there is no user logged in (use case: automatic synchro of users at connection time)

SVN:trunk[5930]
This commit is contained in:
Denis Flaven
2018-07-05 12:54:58 +00:00
parent ea4854d239
commit d21d732545

View File

@@ -402,9 +402,9 @@ class URP_UserOrg extends UserRightsBaseClassGUI
*/
protected function CheckIfOrgIsAllowed()
{
if (UserRights::IsAdministrator()) { return; }
if (!UserRights::IsLoggedIn() || UserRights::IsAdministrator()) { return; }
$oUser = UserRights::GetUserObject();
$oUser = UserRights::GetUserObject();
$oAddon = UserRights::GetModuleInstance();
$aOrgs = $oAddon->GetUserOrgs($oUser, '');
if (count($aOrgs) > 0)