Page 1 of 1

[SOLVED] Recover the current user

Published: September 3, 2021 - 4:39 PM
by yandre
Good morning,

How do I retrieve the current user?
I tested it with:

Code: Select all

login = get_current_user()
It works fine when testing the package with PyScripter, but when using it, the value system which was returned to me.

By doing:

Code: Select all

login = get_last_logged_on_user().split('\\')[1]
This returns the last user, but I don't find that very elegant...

THANKS

[SOLVED] Re: Recovering the current user

Published: September 7, 2021 - 11:34 AM
by yandre
You should use session_setup() instead of putting your user modifications in install() :D