Dear Colleagues,
I'm a bit newbie regarding PHP but already created in the past a few nice pages using PHPRunner. After a few months I wanted to create another page but this time have some problem with showing a proper user in "Logged on as" line.
Web server: IIS + PHP
PHPRunner 6.1 and 8.1 - same problem on both versions
I wanted to have single sign on based on logged user on Windows PC. Added below code:

I wanted to use dynamic permissions, then created an SQL table with users:

Login page in project looks like:

ugmembers table contains:

"Logged on as" is by default form generator:

User TP1\PLTEST1 is Admin and I use this user to logon to my PC and authenticate with domain TP1.
Variable $_SESSION["UserID"] returns TP1\PLTEST1
Variable $_SERVER["REMOTE_USER"] returns TP1\PLTEST1
IIS log shows that accessing my project user TP1\PLTEST1 is detected.
And finally, if I open the webpage I see then:

Audit detects proper user:

What I'm doing wrong???
As newbie I understand this like field "username"

does not show user but user is detected properly.
Thanks in advance for any advice.
Brgds
Mariusz