You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
It's been driving me crazy for about 4 hours now, but I think I've solved it.
When one tries to check permissions for an unauthenticated user (guest), a wrong assertion that $user['User']['user_group_id'] is set causes the process to fail, creating a weird query like:
...UserGroupPermission.user_group_id = OR...
I've managed to patch it by further editing (your edited) authsome.php (line 57):
from:
return $userModel->UserGroup->isUserGroupAccess($user['User']['user_group_id'],$access);
to:
/* NITZ DID IT*/
if(isset($user['User']))
return $userModel->UserGroup->isUserGroupAccess($user['User']['user_group_id'],$access);
else return $userModel->UserGroup->isUserGroupAccess(3,$access);
to make it use 3 (guest account) as the account type, when there's no account to be found.
I'd try to fix it myself in the source code, but it'd be rude and I'm real new to git (signed up to make this comment)
Cheers!
The text was updated successfully, but these errors were encountered:
Hi.
It's been driving me crazy for about 4 hours now, but I think I've solved it.
When one tries to check permissions for an unauthenticated user (guest), a wrong assertion that $user['User']['user_group_id'] is set causes the process to fail, creating a weird query like:
...UserGroupPermission.user_group_id = OR...
I've managed to patch it by further editing (your edited) authsome.php (line 57):
from:
return $userModel->UserGroup->isUserGroupAccess($user['User']['user_group_id'],$access);
to:
/* NITZ DID IT*/
if(isset($user['User']))
return $userModel->UserGroup->isUserGroupAccess($user['User']['user_group_id'],$access);
else return $userModel->UserGroup->isUserGroupAccess(3,$access);
to make it use 3 (guest account) as the account type, when there's no account to be found.
I'd try to fix it myself in the source code, but it'd be rude and I'm real new to git (signed up to make this comment)
Cheers!
The text was updated successfully, but these errors were encountered: