emreakay / CodeIgniter-Aauth

Authorization, Authentication and User Management library for Codeigniter 2.x and 3.x to make easy user management and permission operations
http://emreakay.com
GNU Lesser General Public License v3.0
393 stars 234 forks source link

Create group return 0 when success #258

Closed bagaskarala closed 4 years ago

bagaskarala commented 4 years ago

Why $this->aauth->create_group("editor", "group for editor"); return 0 when it is success, and return nothing when failed?

When i this code i if block, it will never return true value

REJack commented 4 years ago

It returns the group id if it successfully inserted and false if not.

bagaskarala commented 4 years ago

It returns the group id if it successfully inserted and false if not.

I reproduce the error below:

Database before new group created before

My code to create group code

When i call the function func invoke

It success created, but i wonder why returned value is 0 after

I'm using PHP 7.3.10 and codeigniter 3.1.11

REJack commented 4 years ago

I see what you mean and fixed it already on master branch, this was caused by the pre-caching feature 🤦‍♂.

bagaskarala commented 4 years ago

I see what you mean and fixed it already on master branch, this was caused by the pre-caching feature 🤦‍♂.

Okay thanks it now works properly

emreakay commented 4 years ago

:+1: Thank everyone