04-01-2017, 10:24 AM
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';
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';