Tuesday, 15 July 2014

authentication - Different name fields user table? -


I have 2 fields ( username, password ) and those 2 with a MySQL table There is a form with example: ( my_user, my_pass ).

If you change only the username field on another, then works for me as well, so I have problems with the password field < P> My config auth.php

  'driver' = & gt; 'Eloquent'   

update

Already found a solution in my controller, can not change the name of password .

ago (WROG): Whatever I did in the first place was wrong

  $ userdata = array ('my_user' = & gt; Input :: find ('My_user'), 'my_pass' = & gt; Input :: find ('my_pass'));   

should be

  $ userdata = array ('my_user' = & gt; Input :: find ('my_user'), 'password' = & Gt; Input :: find ('my_pass'));    

You can set your username and password fields in auth.php Return

  Returns array ('driver' = & gt; 'eloquence', 'username' = & gt; 'my_user', 'password' = & gt; 'my_pass ',' Model '= & gt;' user ',' table '= & gt;' user ',);   

I hope this might be some help.

No comments:

Post a Comment