-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is_allowed improvement #166
Comments
Hi @stupidoes, in my opinion the first 2 codeblocks are not dead code, only this can check perms for the public group, if we delete this then the public group is useless. the idea with the break is good, i change it later and create a new release for this. |
Could you provide me with case when $user_id is still in FALSE value when entering the condition ? Because i think it will become $this->CI->session->userdata('id') value or NULL if user not logged in. |
😵 sorry you are right the "dead code" is really dead and its not needed too. I change it in the next days. |
Thanks.. :) |
I close this issue 😄 |
i found dead code here :
since $user_id is already set to get from session above. Even when user not logged in, $user_id would become NULL instead.
and i think, it's better to put 'break' when found permission inside group since it wouldn't need to check another group for the same permission.
The text was updated successfully, but these errors were encountered: