Thread: Getting user name
-
January 7th, 2022, 19:10 #1
Getting user name
Do User.getUsername() and Session.UserName return the same information? Should we prefer using one or the other? I don't see Session.UserName being used in CoreRPG at all, so I guess User.getUsername() is preferred?
-
January 7th, 2022, 19:13 #2
The API reference for both says they return the "local user's network username" - so they should be the same.
The Session package contains variables with the data - it doesn't do a full API call like the User package does. Using Session is more efficient and preferable.Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
January 7th, 2022, 19:34 #3
User.getUsername()=GM Session.UserName=darrenan
They don't return the same data.
-
January 7th, 2022, 19:36 #4Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks