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
394 stars 235 forks source link

User Variables #19

Closed ghost closed 9 years ago

ghost commented 10 years ago

So I have just updated to Aauth 2.0 and I am trying to use User Variables.

They are working just fine except for when I create one and then try to update it. Rather than updating, it creates a new one for the same user. So then you end up with multiple variables of the same thing because it creates a new row in the database each time.

Is anyone else having this issue or is it just me? I have uploaded a screenshot of the function in my controller if that helps at all...

Well, It seems to only do it with nuerical values (1-9) because the other variable I have set up for a business name works just fine.

screen shot 2014-08-20 at 9 13 19 pm

emreakay commented 10 years ago

Thank you for bug declaration. I will be looking for it as soon as possible. Probably it is a minor bug, I will solve the issue.

ghost commented 10 years ago

Okay please comment when you have fixed it. :O

alfonsor commented 10 years ago

@TheGreenPanda ¿You're trying to put gravatar_access = false?

ghost commented 10 years ago

Either '1' for Enabled or '0' for Disabled. The database will store either a 1 or a 0. But that isn't the problem.

emreakay commented 10 years ago

I'm very busy this week. Until I find time to solve and commit the code, I advise you to use "e" for enabled and "d" for disabled.

alfonsor commented 10 years ago

@TheGreenPanda You can temporarily, in line 1700 change if ( ! $this->get_user_var($key,$user_id) ) { for if ($this->get_user_var($key,$user_id) ===false) { Null vs. False vs. 0 in PHP

emreakay commented 10 years ago

@alfonsor thank you for your solution. You can commit it if you want.

alfonsor commented 10 years ago

@emreakay Yes, please! My knowledge of Git are poor!

emreakay commented 10 years ago

Ok. I'm going to commit.

ghost commented 10 years ago

That is pretty cool! Thanks guys!