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
how to prepare?
#1
I have this

https://pastebin.com/j06N2nf6

I can replace the $conn with

require_once 'users/init.php';
$conn = DB::getInstance();

That works just fine.

But how do I get the user_id inthere?

I get that this should do the trick.

$user_id = (isset($user) && $user->isLoggedIn())? $user->data()->id : 0;

But if I add these requires to the file things stop working.

require_once $abs_us_root.$us_url_root.'users/includes/header.php';
require_once $abs_us_root.$us_url_root.'users/includes/navigation.php';
  Reply


Messages In This Thread
how to prepare? - by gaby de wilde - 04-01-2017, 10:24 AM
how to prepare? - by karsen - 04-04-2017, 11:24 PM
how to prepare? - by gaby de wilde - 04-06-2017, 09:35 PM
how to prepare? - by mudmin - 04-07-2017, 11:03 AM
how to prepare? - by Brandin - 04-08-2017, 01:53 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)