CodeIgniter Forums
MeNeedz Auth - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: MeNeedz Auth (/showthread.php?tid=13058)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20


MeNeedz Auth - El Forum - 11-30-2008

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


MeNeedz Auth - El Forum - 12-05-2008

[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


MeNeedz Auth - El Forum - 12-05-2008

[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.


MeNeedz Auth - El Forum - 12-05-2008

[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


MeNeedz Auth - El Forum - 12-05-2008

[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!


MeNeedz Auth - El Forum - 12-06-2008

[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);
?


MeNeedz Auth - El Forum - 12-06-2008

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


MeNeedz Auth - El Forum - 12-06-2008

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


MeNeedz Auth - El Forum - 12-06-2008

[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.


MeNeedz Auth - El Forum - 12-10-2008

[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?