Skip to content
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

insufficient group privileges / group_id issue #1

Closed
JadedEvan opened this issue Jun 25, 2009 · 2 comments
Closed

insufficient group privileges / group_id issue #1

JadedEvan opened this issue Jun 25, 2009 · 2 comments

Comments

@JadedEvan
Copy link

Noticed a bug in the libraries/Auth.php file, near line 82:

Reads:
$user_level = $this->CI->session->userdata('group');

When it should be:
$user_level = $this->CI->session->userdata('group_id');

As in the login() function in the same file you set the session variable as 'group_id', not 'group'

@JadedEvan
Copy link
Author

Similarly, I added a redirect based on the user's group settings at the end of the login() function. Again there is trouble because of the group/group_id issue. Around line 143:
$auth_type => $username,
'username' => $row['username'],
'user_id' => $row['id'],
'group_id' => $row['group_id'],
'logged_in' => TRUE
);

Nowhere in that block is the 'group' being set. It'd be nice to access that instead of passing around the group_id.

@adamgriffiths
Copy link
Owner

I have fixed this issue in the latest commit to the repo. The correct reference for the group ID is 'group_id' not 'group'.

Hopefully this clears things up.

If you'd like to double check this in the repo I can close this issue then.

Thanks.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants