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?
Printable View
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?
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.
User.getUsername()=GM Session.UserName=darrenan
They don't return the same data.