(04-26-2019, 06:16 PM)mudmin Wrote: Ok. That seems really weird. Does your template seem to be working? Does it seem like you're logged in?
Try just doing dump($user); somewhere on the page and seeing if all the $user info is there.
Yeah, it's odd. I'm back to trying to figure it out. I added start_session() at the top of the page, just below the 2 "require_once" lines, and it still isn't keeping a session.
When I go to index.php or messages.php or any other page, it shows in the banner that I'm logged in and the session is valid, but on in the users folder, wall.php does not keep the session. If I reload any other the other pages, the session is still active. wall.php doesn't load it, for some reason, and shows this:
User Object
(
[_db:User:private] => DB Object
(
[_pdoB:private] => PDO Object
(
)
[_queryB:private] => PDOStatement Object
(
[queryString] => SELECT id, group_id FROM groups_menus WHERE menu_id = ?
)
[_errorB:private] =>
[_errorInfoB:private] => Array
(
[0] => 0
[1] =>
[2] =>
)
[_resultsB:private] => Array
(
[0] => stdClass Object
(
[id] => 7
[group_id] => 0
)
)
[_resultsArrayB:private] => Array
(
[0] => Array
(
[id] => 7
[group_id] => 0
)
)
[_countB:private] => 1
[_lastIdB:private] => 0
[_queryCountB:private] => 17
)
[_data:User:private] =>
[_sessionName:User:private] => user
[_isLoggedIn:User:private] =>
[_cookieName:User:private] => pmresofiw318373csb
[_isNewAccount:User:private] =>
[tableName] => users
)
I have also logged in to the site with an iOS device and sessions are find for all pages except wall.php
At the top of wall.php I have:
<?php
require_once '../users/init.php';
require_once $abs_us_root.$us_url_root.'users/includes/template/prep.php';
?>
Also, $abs_us_root.$us_url_root.'users/includes/template/prep.php'; = /home/admin/public_html/users/includes/template/prep.php (which is valid)
In users/init.php after session_start(); I added a print_r($_SESSION) and found that in all pages there is a valid session, except users/wall.php $_SESSION is not even set. But the thing is, if I go to any other existing page (messages.php mail index etc) the session is valid again and init.php's print_r ($_SESSION) shows valid for all pages except wall.php, even if I go back and forth to different pages.
I put wall.php in usersc and get the same results.
I think at this point, I have to go into init.php to see where things are getting lost. The session isn't valid anymore after the 2 require_once lines. Working on it more tonight.
* solved *
It was the footer. This was missing:
<?php require_once $abs_us_root . $us_url_root . 'usersc/templates/' . $settings->template . '/footer.php'; //custom template footer ?>
This footer must be there, like you said, this has something to do with the templates, and that needs the footer.
I am assuming that in this footer, it uses "usersc" instead of "users" because it wants to give first dibbs to the usersc folder for templates or changes to templates, over the "users" folder.