CurrentUser()
GralfR opened this issue · 2 comments
The function CurrentUser()
holds information about the current logged in user. Details can be found with CurrentUser():Dump()
But: The function does not work inside the cleanup-function of a timer so far (MA3 v1.9.3.3).
Try this Plugin that Echos the current username each second (but crashes, if the plugin is stopped):
local function running()
Echo("running Timer: "..CurrentUser().Name)
end
local function stop()
Echo("timer stopped by "..CurrentUser().Name)
end
local function start()
Echo("Plugin started by "..CurrentUser().Name)
Timer(running, 1, 0, stop)
end
return start
Thanks for this.
I just noticed the Dump()
as well as the entry in the manual. It's probably been there for some time but I haven't been paying enough attention.
For the moment I have added the UserDataObject since this is what CurrentUser()
and others return, I'll add the CurrentUser function when I have some more time.
Closing this up. I added both CurrentUser() and UserDataObject
I'll add a note to the Dump() Function later.