STAR TREK 2d20
  1. #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?

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    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!

  3. #3
    User.getUsername()=GM Session.UserName=darrenan

    They don't return the same data.

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Quote Originally Posted by darrenan View Post
    User.getUsername()=GM Session.UserName=darrenan

    They don't return the same data.
    So that's either an issue with the code or the API documentation.
    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!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Starfinder Playlist

Log in

Log in