[SOLVED] $user in debug | Uniface 9 | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

—  Results per page  —








— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters
For a group of consecutive words like 'end of support' use Match phrase

sp_Feed Topic RSS sp_TopicIcon
[SOLVED] $user in debug
08 Feb 2018
6:02 pm
Avatar
brenaa
Member
Forum Posts: 5
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Hello to all,
debugging a client server environment $user returns the login user (in this case “userver”).
Debugging a Uniface Web Service $user returns “USER” and not “userver” how defined in web.xml.

This is the web.xml configuration:

       <Param-value> UV8: ServerName + 13001 | domainName\UserName|Password|ewebdbg </ param-value>

where UserName is “userver”.

Can anyone explain to me why?
thank you

Alessandro

09 Feb 2018
10:22 am
Avatar
diseli
Admin
Forum Posts: 882
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Hello Alessandro,

The function $user is working a bit different in a web environment:

> Uniface Reference > Proc: Functions > $user:

In a Web environment, if Path is omitted, $user returns:

Authenticated user name used when connecting to the Web server

Empty string (“”), if no user authentication has taken place between server and browser or if there is a license problem

(Within the Web environment, Uniface does support spaces in user names; this is handled by the authentication process.)

I guess you are not using any authentication. Not sure why $user is not empty in this case.

Luckily there is another way to get the user name of the current process: $processinfo(“user”)

If I remember correctly then the mentioned function was introduced with the version 9.4.01 patch R110.

I hope this helps.

Kind regards,

Daniel

09 Feb 2018
11:13 am
Avatar
brenaa
Member
Forum Posts: 5
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Thank you Daniel,

$processinfo(“user”) returns the right user.

I have another problem with PdfCreator and I thought it depended on it.
I will open another discussion about it.

Regards,

Alessandro

09 Feb 2018
11:32 am
Avatar
diseli
Admin
Forum Posts: 882
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Hello Alessandro,

Thank you for your reply. And you are welcome.

I’ll set this post to solved now.

Regards,

Daniel

14 Feb 2018
9:27 am
Avatar
istiller
Member
Forum Posts: 221
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

diseli said
Luckily there is another way to get the user name of the current process: $processinfo(“user”)

If I remember correctly then the mentioned function was introduced with the version 9.4.01 patch R110.

 

Okay, you got the pure user name

But what about the domain the user belongs to, any way to get this information ?

Ingo

14 Feb 2018
10:46 am
Avatar
diseli
Admin
Forum Posts: 882
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Hi Ingo,

Uniface currently has no statement or function to retrieve the user domain. But on Windows there are other possibilities:

You could (for example) use the WshNetwork Object that is part of the Windows Scripting Host. It can be accessed using the COM Call-out interface. The mentioned object provides a property to retrieve the user domain. You can import the COM signatures for the WshNetwork Object as follows:

> idf.exe /sti /mwr=com /pid WScript.Network

After import you should find a COM signature called WSHNETWORK and (amongst others) a operation called GET_USERDOMAIN.

Hope this helps.

Daniel

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 131

Currently Online: schut, eof586
14 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ulrich-merkel: 1731

Iain Sharp: 637

Theo Neeskens: 349

gianni: 276

rogerw: 244

istiller: 221

lalitpct: 197

Knut: 189

Arjen van Vliet: 174

sochaz: 173

Member Stats:

Guest Posters: 3

Members: 7663

Moderators: 0

Admins: 8

Forum Stats:

Groups: 1

Forums: 62

Topics: 2103

Posts: 9102

Newest Members:

JerryJax, WilliamEmoth, StacyEcola, Williamnum, erinna60, DavidAnine, plaza, ErmaveBob, TanaKes, dxzoom

Administrators: admin: 23, Adrian Gosbell: 291, diseli: 882, Bob Maier: 3, Nico Peereboom: 72, Michael Rabone: 4, richiet: 406, JanCees: 28