[eluser]Unknown[/eluser]
Hi Ben,
First off thanks for an awesome Auth library
I have found a little bug when trying to update a user group and only the group, no other user data in the method user_update from ion_auth_model.php.
It gives me the following error:
Quote:You must use the SET method to update an entry
I think that happens when the method tries to update the table "meta" when the array data doesn't contains information for that table since it only checks for the columns array not to be empty.
So i modify the if statement in line 803 of ion_auth_model.php from this:
Code:
if (!empty($this->columns))
to this:
Code:
if (!empty($this->columns) && !(count(array_diff($this->columns,$data))==count($this->columns)))
I also change the if from line 820 to check if the array contains the group_id field
Code:
if (array_key_exists('username', $data) || array_key_exists('password', $data) || array_key_exists('email', $data) || array_key_exists('group_id', $data))
I know have it working, but i don't know if there is a better solution for this.
Hope you understand and sorry for my bad english :-)