navruzm/laravel-mongo-auth — pull request #2 by lucacri (2013-03-28 04:25:42+00:00)
Title: Fix for an error when attempting a login

Without this fix, i get a nasty error when trying to perform a simple Auth::attempt(username, password).

Full stack:

ErrorException: Warning: Illegal offset type in /var/www/lucacri/vendor/navruzm/lmongo/src/LMongo/Query/Builder.php line 1829

in /var/www/lucacri/vendor/navruzm/lmongo/src/LMongo/Query/Builder.php line 1829
at ErrorHandler->handle('2', 'Illegal offset type', '/var/www/lucacri/vendor/navruzm/lmongo/src/LMongo/Query/Builder.php', '1829', array('columns' => array(), 'column' => object(Connection))) in /var/www/lucacri/vendor/navruzm/lmongo/src/LMongo/Query/Builder.php line 1829
at Builder->prepareColumns() in /var/www/lucacri/vendor/navruzm/lmongo/src/LMongo/Query/Builder.php line 1358
at Builder->get(object(Builder)) in /var/www/lucacri/vendor/navruzm/lmongo/src/LMongo/Query/Builder.php line 1413
at Builder->first(object(Builder)) in /var/www/lucacri/vendor/navruzm/laravel-mongo-auth/src/MongoAuth/MongoUserProvider.php line 83
at MongoUserProvider->retrieveByCredentials(array('username' => 'Lucacri', 'password' => '1711luca')) in /var/www/lucacri/vendor/laravel/framework/src/Illuminate/Auth/Guard.php line 188
at Guard->attempt(array('username' => 'Lucacri', 'password' => '1711luca'), false)
at call_user_func_array(array(object(Guard), 'attempt'), array(array('username' => 'Lucacri', 'password' => '1711luca'), false)) in /var/www/lucacri/bootstrap/compiled.php line 10734
at Manager->__call('attempt', array(array('username' => 'Lucacri', 'password' => '1711luca'), false)) in /var/www/lucacri/bootstrap/compiled.php line 4290
at MongoAuthManager->attempt(array('username' => 'Lucacri', 'password' => '1711luca'), false) in /var/www/lucacri/bootstrap/compiled.php line 4290
at Facade::__callStatic('attempt', array(array('username' => 'Lucacri', 'password' => '1711luca'), false)) in /var/www/lucacri/app/controllers/LoginController.php line 28
at Auth::attempt(array('username' => 'Lucacri', 'password' => '1711luca'), false) in /var/www/lucacri/app/controllers/LoginController.php line 28
at LoginController->postLogin()
at call_user_func_array(array(object(LoginController), 'postLogin'), array()) in /var/www/lucacri/vendor/laravel/framework/src/Illuminate/Routing/Controllers/Controller.php line 138
at Controller->callMethod('postLogin', array()) in /var/www/lucacri/vendor/laravel/framework/src/Illuminate/Routing/Controllers/Controller.php line 115
at Controller->callAction(object(Application), object(Router), 'postLogin', array()) in /var/www/lucacri/bootstrap/compiled.php line 7040
at Router->Illuminate\Routing\{closure}()
at call_user_func_array(object(Closure), array()) in /var/www/lucacri/bootstrap/compiled.php line 13189
at Route->callCallable() in /var/www/lucacri/bootstrap/compiled.php line 13168
at Route->run(object(Request)) in /var/www/lucacri/bootstrap/compiled.php line 7060
at Router->dispatch(object(Request)) in /var/www/lucacri/bootstrap/compiled.php line 947
at Application->dispatch(object(Request)) in /var/www/lucacri/bootstrap/compiled.php line 935
at Application->run() in /var/www/lucacri/public/index.php line 51