“[System]Client/User/Username Tag Retains Previous Session User Name [UserManagement]”

Hello everyone,
I am working with an Ignition Vision Client and I am using a custom login window instead of the built-in Ignition login screen.

Current setup:

  • When the Vision Client starts, it automatically opens without showing the Ignition login screen.

  • I created a custom login window where users enter their username.

Example workflow:

  1. A user logs in as admin.

  2. When actions are performed, the username is logged into the database using the Vision Client Tag [System]Client/User/Username, and it correctly logs admin.

  3. The user clicks the Logout button.

  4. The client does not close. The username becomes No User, and the login window opens again.

  5. The next user logs in as supervisor.

Problem:
When the supervisor performs the first action after logging in, the system logs the username as admin (the previous user).

However, when we close the Vision Client application and then log in again as supervisor, it logs correctly as supervisor.

This suggests that the Vision Client Tag [System]Client/User/Username may still be holding the previous session value for the first action after re-login.

Suggestions:

  • Do we have any way to refresh the username tag manually after a login?

  • Is there a method to override this behavior so the correct username is available immediately without closing and reopening the Vision Client?

Any suggestions would be greatly appreciated.

How does this custom login page actually work? This is most likely to be the culprit.

3 Likes

Hi,

Thank you for your suggestion.

The issue was on my side. I had initially declared the tag value in a global scope, so it was retaining the previous value during the first action after re-login.

I have now moved the tag read inside the function itself, so it fetches the current value each time it is executed. After making this change, the username is updating correctly and the issue is resolved.

Appreciate your help!

2 Likes

I'm almost curious why you're bothering making a custom login page. While I do have an auto-login user specified in all my projects just named "readonly", my logout function on my screen logs the user in as that "readonly" user and limits their access. If you're taking them back to the generic login page without letting them access anything at all, why not just use it?

2 Likes