The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a little help - facebook login cookie
#3
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'));
  Reply


Messages In This Thread
a little help - facebook login cookie - by tjones - 04-18-2018, 06:14 PM
a little help - facebook login cookie - by tjones - 04-23-2018, 10:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)