Welcome Guest, Not a member yet? Register   Sign In
MeNeedz Auth
#91

[eluser]ervinter[/eluser]
I am using your auth library in my project. Simple and effective library!
#92

[eluser]abmcr[/eluser]
I have set into the librarie this row
Code:
var $use_remember_me = TRUE;
It is necessary to create a check box in the login form or no?
This is the correct mode for create a cookie and changes expiration time of session. But where i set the time of cookie?
Thank you
#93

[eluser]davidbehler[/eluser]
Yeah, add a checkbox to your form and set
Code:
$config['input_config']['login']['remember']
to whatever your checkbox name is.

That should work.
#94

[eluser]Mat-Moo[/eluser]
Login with password hash doesn't look right. Line 178
Code:
$password_hash = $this->encryption_method."(concat(".str_replace("%password%", $this->CI->db->escape($user_password), str_replace("%salt%", $user_database_config['user_salt_column'], str_replace(".", ", ", $this->encryption_order)))."))";
Results in $password_hash=md5(concat(Salt, 'YtqY85r4/uwhd5sWokwX'))
I can see the logic but not why it's wrong Smile
#95

[eluser]Mat-Moo[/eluser]
Ah I see, your letting mysql do the concat, my bad. I was looking too deep because I set the user_identifier_column wrong!
#96

[eluser]abmcr[/eluser]
[quote author="waldmeister" date="1228519024"]Yeah, add a checkbox to your form and set
Code:
$config['input_config']['login']['remember']
to whatever your checkbox name is.

That should work.[/quote]

as
Code:
echo form_checkbox('remember_me', '1', TRUE);
?
#97

[eluser]davidbehler[/eluser]
Guess that should work, yes.
#98

[eluser]Mat-Moo[/eluser]
Does it only work with checkboxes? they are so damn ugly!
#99

[eluser]splufdaddy[/eluser]
I think I found a bug with the change_password function.

When you're generating the new password, your escaping the salt and the new password individually inside the md5. That was causing the password_hash to be in effect:
Code:
md5("'SALT'"."'newpassword'")

I changed line 763 to this, and the change password function generates the correct password:
Code:
$password_hash = $encryption_method(str_replace("%password%", $new_password, str_replace("%salt%",$salt, str_replace(".", "", $this->encryption_order))));

Let me know if you can replicate this. Before I changed that code, I couldn't log in after changing my password.

[eluser]Mat-Moo[/eluser]
How many fields does the Register function write to the database? I've finished my registration form, and at looking at adding the data to the database. My users database has about 25 fields, and from what I can tell Auth will only do the 4 fields in register. So is it then up to me to update the record?




Theme © iAndrew 2016 - Forum software by © MyBB