Page 1 of 1

nuAccessLevelCode and Group Id

Posted: Fri Mar 27, 2020 5:41 am
by ARWEN
Hi,

string = nuAccessLevelCode() Returns the Access Level Code.

I'm loooking to a function that returns the USER_GROUP_ID (hash cookie) in Javascript?

Re: nuAccessLevelCode and Group Id

Posted: Sat Mar 28, 2020 5:14 am
by Janusz
Arwen,
Maybe you can use following:

create PHP proc. named: my_group

Code: Select all

$gr='#USER_GROUP_ID#';
$js="grp_id='".$gr."';";
nuJavascriptCallback($js);
and from JS you can get the value with:

Code: Select all

var grp_id;
nuRunPHPHidden('my_group', 1);
console.log(grp_id);

Re: nuAccessLevelCode and Group Id

Posted: Sat Mar 28, 2020 11:36 pm
by admin
ARWEN,

Janusz's is a good answer.

But I've added a new function in the latest version today.

https://wiki.nubuilder.cloud/ ... essLevelId

Steven

Re: nuAccessLevelCode and Group Id

Posted: Thu Apr 09, 2020 1:34 pm
by ARWEN
I really appreciate your help. Thank you.

Re: nuAccessLevelCode and Group Id

Posted: Fri Apr 10, 2020 1:33 am
by admin
no worries.