When I try to use the session hash variables (#access_level#, #zzsys_user_id#, #session_id#) in SQL fields of several objects, nothing displays.
E.g. SELECT '#access_level#' -> nothing
When I log in as globeadmin, SELECT IF('#access_level#'='globeadmin',1,0) -> displays 0.
It is strange, because as described in Wiki http://wiki.nubuilder.com/tiki-index.ph ... uilderDocs, these variables must be available in objects...
Maybe anybody can explain this please?
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Session hash variables in objects
-
- Posts: 8
- Joined: Wed Sep 28, 2011 2:11 pm
- Location: Russia
-
- Posts: 84
- Joined: Mon Jul 04, 2011 12:52 am
-
- Posts: 8
- Joined: Wed Sep 28, 2011 2:11 pm
- Location: Russia
Re: Session hash variables in objects
[ in replaceVariablesInString function (common.php) to:
Thank you for reply.
You are right, zazzium. But I cannot change it, because I use shared hosting. I solve the problem by replacingzazzium wrote:Check whether the php register_globals are turned on
Code: Select all
$ses = nuSession($GLOBALS[nuCookieName('security_check')]);
Code: Select all
$ses = nuSession($_COOKIE[nuCookieName('security_check')]);
-
- Site Admin
- Posts: 2782
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 2 times
Re: Session hash variables in objects
Vladimir,
We are trying to fix a couple of bugs related to this at the moment.
Steven
We are trying to fix a couple of bugs related to this at the moment.
Steven
-
- Posts: 8
- Joined: Wed Sep 28, 2011 2:11 pm
- Location: Russia
Re: Session hash variables in objects
Steven,
I suggest also to add following to replaceVariablesInString():
because #ses# and #session_id# does not initializing in objects of form.
Thank you.
I suggest also to add following to replaceVariablesInString():
Code: Select all
$pString = str_replace("#ses#", $ses->zzsys_session_id, $pString);
$pString = str_replace("#session_id#", $ses->zzsys_session_id, $pString);
Thank you.
-
- Site Admin
- Posts: 2782
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 2 times
Re: Session hash variables in objects
Vladimir,
From version 11.11.03 you don't need globals on.
The next version will have these hash variables available for use..
#ses# ($ses->zzsys_session_id)
#session_id# ($ses->zzsys_session_id)
#session_parameter# ($ses->sss_parameter)
#access_level# ($ses->sss_access_level)
#zzsys_user_id# ($ses->sss_zzsys_user_id)
#zzsys_user_group_name# ($ses->sss_zzsys_user_group_name)
#small# ($ses->sss_small)
#clone# ($_GET['c'])
#dir# ($_GET['dir'])
#formID# ($_GET['f'])
#id# (id parameter)
#recordID# (id parameter)
#TT# (temp table name)
#browseTable# (temp table name)
Steven
From version 11.11.03 you don't need globals on.
The next version will have these hash variables available for use..
#ses# ($ses->zzsys_session_id)
#session_id# ($ses->zzsys_session_id)
#session_parameter# ($ses->sss_parameter)
#access_level# ($ses->sss_access_level)
#zzsys_user_id# ($ses->sss_zzsys_user_id)
#zzsys_user_group_name# ($ses->sss_zzsys_user_group_name)
#small# ($ses->sss_small)
#clone# ($_GET['c'])
#dir# ($_GET['dir'])
#formID# ($_GET['f'])
#id# (id parameter)
#recordID# (id parameter)
#TT# (temp table name)
#browseTable# (temp table name)
Steven