Help determining who is current user

Hello,

I am implementing a WEB server that has utilizes password protected realms, like in the examples. I get the username/password dialog box when I first enter the realm, and everything seems to run fine except when I try to get the current username. My code in short is something like:

/* Assuming that the user logged in and is a valid account/realm permissions */
void * httpServerDataPtr;
Unsigned32 remoteIp;
char * curUserName;

httpServerDataPtr = RpHSGetServerData(); // I get some address

remoteIp = RpGetRemoteIpAddress(httpServerDataPtr); // I get the IP of the asking (remote) computer

curUserName = RpGetCurrentUserName(httpServerDataPtr); // I get NULL no matter what I do

I tried both AWS and the basic server, and anything else that came to mind but to no avail. I need the function RpGetCurrentUserName in order to dynamically display or hide certain options for the user’s realm.
Can anyone please tell me what am I doing wrong, or if you have another way of determining who is current user/level can someone please post an example?

Regards,

Ivica Eftimovski

P.S. I am using NetOS 6.0F version.

Message was edited by: ieftimovski