if I login as globeadmin.[USER_ID] => globeadmin
But what will be the value of [USER_ID] for non admin account?
How can I run nuDebug() in user mode?
if I login as globeadmin.[USER_ID] => globeadmin
kev1n wrote:Hi,
Could you describe a bit what you want to do exactly?
SELECT mtabel.* FROM mtabel
where
manager_id='#USER_ID#'
SELECT mtabel.* FROM mtabel
LEFT JOIN zzzzsys_user ON sus_login_name = manager_id
WHERE zzzzsys_user_id = '#USER_ID#'
[0] : Array
(
[USER_ID] => 5fe2cef8cdb0cf0
[USER_GROUP_ID] => 5fe2ceed176ce09
[HOME_ID] => nuhome
[GLOBAL_ACCESS] => 0
[ACCESS_LEVEL_CODE] => test
)
#USER_NAME#
#USER_LOGIN_NAME#
kev1n wrote:#USER_ID# contains the primary key (zzzzsys_user_id) of the table
zzzzsys_user and not the login name.
If manager_id contains the login name, you need a join with the zzzzsys_user table.
The SQL is then going to look something like this:
- Code: Select all
SELECT mtabel.* FROM mtabel
LEFT JOIN zzzzsys_user ON sus_login_name = manager_id
WHERE zzzzsys_user_id = '#USER_ID#'