happyninjas/fuel-ninjauth — Issue #11: Failed authentication insert because user_hash credentials are null
Author: zarunor
Created: 2011-12-15 04:52:23+00:00
State: open

Hi, inserting an authentication fails because the credentials are missing.

In controller.php:

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();

However, $user_hash doesn't have a key named 'credentials.' What is supposed to be setting it? Consequently, the insert fails with error:

Fuel\Core\Database_Exception [ Error ]: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'provider' cannot be null with query: "INSERT INTO `authentications` ...

Is this an issue, or am I doing something leading to the credentials not being set? Thanks.