04-23-2018, 10:08 PM
Here is actually the working code for others needing to do the same thing. It took a good nights rest to figure it out, but user.php is never called so the "$this" construct doesn't exist. The below is pasted before both redirects in fb-callback.php. Hopefully others find it as useful as I do!
$hash = Hash::unique();
$db->get('users_session' , array('user_id', '=', $_SESSION["user"]));
$db->insert('users_session', array(
'user_id' => $_SESSION["user"],
'hash' => $hash,
'uagent' => Session::uagent_no_version()
));
Cookie::put(Config::get('remember/cookie_name'), $hash, Config::get('remember/cookie_expiry'));
$hash = Hash::unique();
$db->get('users_session' , array('user_id', '=', $_SESSION["user"]));
$db->insert('users_session', array(
'user_id' => $_SESSION["user"],
'hash' => $hash,
'uagent' => Session::uagent_no_version()
));
Cookie::put(Config::get('remember/cookie_name'), $hash, Config::get('remember/cookie_expiry'));