'packages' => array( 'orm', 'parser', 'ninjauth', 'auth' ),
<?php class Controller_Auth extends \NinjAuth\Controller {}
ErrorException [ Error ]: Class 'OAuth2\Provider' not found
PKGPATH/ninjauth/classes/strategy/oauth2.php @ line 12
ErrorException [ Error ]: Class 'OAuth2\Exception' not found PKGPATH/oauth2/classes/exception.php @ line 12
if (\Auth::check()) { list($driver, $user_id) = \Auth::instance()->get_user_id(); $num_linked = Model_Authentication::count_by_user_id($user_id); ... } // The user exists, so send him on his merry way as a user else if ($authentication = Model_Authentication::find_by_uid($user_hash['uid'])) { ...
Fuel\Core\FuelException [ Error ]: Listing columns failed, you have to set the model properties with a static $_properties setting in the model. Original exception: Database method Fuel\Core\Database_PDO_Connection::list_columns is not supported by Fuel\Core\Database_PDO_Connection PKGPATH/orm/classes/model.php @ line 249
Harro Verton wrote on Tuesday 27th of December 2011:That has nothing to do with Ninjauth. You are using a database driver that doesn't support the list_columns() method. In that case, the ORM requires you do define the table properties in the model manually. See the documentation.
Fuel\Core\FuelException [ Error ]: Listing columns failed, you have to set the model properties with a static $_properties setting in the model. Original exception: invalid data source nameat location it works fine.
Hello WanWizard. You were correct. I have passed this error and have come a long way since. Now I really cross up with a Ninjauth-related problem. Please see my comment (last one) in this Ninjauth blog post: http://philsturgeon.co.uk/blog/2011/09/ninjauth-social-integration-php. I am pasting the whole comment here as well. See below: I am trying to setup ninjauth with latest release of Fuel-PHP (1.1/master), and it doesn't seem to be working. I have setup all packages required for ninjauth: auth, oauth, oauth2, orm and all configuration needed for ninja auth. I am testing with Facebook login. I entered the right id and secret keys into ninjauth configuraiton. When I go to my site @ [url=http://localhost/fuel/public/auth/session/facebook,]http://localhost/fuel/public/auth/session/facebook,[/url] the ninjauth does show me registration site where the form data get's pulled from Facebook correctly. Clicking "submit" button does insert a new row into "users" table, but the insert into "authentications" table fails becuase insert values are null. Here is the complete error message:Harro Verton wrote on Tuesday 27th of December 2011:That has nothing to do with Ninjauth. You are using a database driver that doesn't support the list_columns() method. In that case, the ORM requires you do define the table properties in the model manually. See the documentation.
Fuel\Core\Database_Exception [ Error ]: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'provider' cannot be null with query: "INSERT INTO `authentications` (`provider`, `uid`, `access_token`, `secret`, `expires`, `refresh_token`, `user_id`, `created_at`, `updated_at`) VALUES (null, null, null, null, null, null, '5', 1324988695, 1324988695)".
if ($user_id) { Model_Authentication::forge(array( 'user_id' => $user_id, 'provider' => $user_hash['credentials']['provider'], 'uid' => $user_hash['credentials']['uid'], 'token' => $user_hash['credentials']['token'], 'secret' => $user_hash['credentials']['secret'], 'created_at' => time(), ))->save(); }
array(8) { ["uid"]=> string(9) "668244746" ["nickname"]=> string(10) "primozrome" ["name"]=> string(11) "Primoz Rome" ["email"]=> string(17) "primozr@gmail.com" ["location"]=> NULL ["description"]=> NULL ["image"]=> string(164) "https://graph.facebook.com/me/picture?type=normal&access_token=AAACl59bsWg8BAHWAZA6ZARmcZBxxXWIsACSZBb5FD02TrDco8j2AkkN4tslRK2uXjH0R2FtKKyfyMylNZCZCDQTlFksmZB0XBsZD" ["urls"]=> array(1) { ["Facebook"]=> string(34) "http://www.facebook.com/primozrome" } }
Harro Verton wrote on Tuesday 27th of December 2011:This is something Phil has to look at. I haven't used it, so I can't comment on it's internal workings...
'packages' => array( "ninjauth","oauth","oauth2","orm","auth" ),now to the command line and run this
oil refine migrate --packages=ninjauth&& to be safe
oil refine migrate
class Controller_Auth extends NinjAuth\Controller {}
It looks like you're new here. If you want to get involved, click one of these buttons!