Cleaning up configuration comments. Converted Eloquent query to use dynamic query.

This commit is contained in:
Taylor Otwell 2011-07-28 13:43:24 -05:00
parent acea14a306
commit b388ebe54c
1 changed files with 7 additions and 5 deletions

View File

@ -8,7 +8,8 @@
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This method is called by the Auth::user() method when attempting to | This method is called by the Auth::user() method when attempting to
| retrieve a user by their user ID. | retrieve a user by their user ID, such as when retrieving a user by the
| user ID stored in the session.
| |
| You are free to change this method for your application however you wish. | You are free to change this method for your application however you wish.
| |
@ -25,18 +26,19 @@
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This method is called by the Auth::check() method when attempting to | This method is called by the Auth::check() method when attempting to
| retrieve a user by their username. | retrieve a user by their username, such as when checking credentials
| received from a login form.
| |
| You are free to change this method for your application however you wish. | You are free to change this method for your application however you wish.
| |
| Note: This method must return an object that has an "id" and a "password" | Note: This method must return an object that has "id" and "password"
| property. The type of object returned doesn't matter. | properties. The type of object returned does not matter.
| |
*/ */
'by_username' => function($username) 'by_username' => function($username)
{ {
return User::where('email', '=', $username)->first(); return User::where_email($username)->first();
}, },
); );