From b388ebe54c6dcc5ae1c97e642b3f4c7eff6032a5 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 28 Jul 2011 13:43:24 -0500 Subject: [PATCH] Cleaning up configuration comments. Converted Eloquent query to use dynamic query. --- application/config/auth.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/application/config/auth.php b/application/config/auth.php index 979231dd..7c3ee766 100644 --- a/application/config/auth.php +++ b/application/config/auth.php @@ -8,7 +8,8 @@ return array( |-------------------------------------------------------------------------- | | 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. | @@ -25,18 +26,19 @@ return array( |-------------------------------------------------------------------------- | | 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. | - | Note: This method must return an object that has an "id" and a "password" - | property. The type of object returned doesn't matter. + | Note: This method must return an object that has "id" and "password" + | properties. The type of object returned does not matter. | */ 'by_username' => function($username) { - return User::where('email', '=', $username)->first(); + return User::where_email($username)->first(); }, ); \ No newline at end of file