Type Function Return value UserInfo Revision 2018.3332 Keywords steam, steamworks, getUserInfo See also steamworks.addEventListener() steamworks.*
Returns a UserInfo object. This provides information about one user account such as the profile name, Steam level, online status, etc.
When calling the steamworks.requestLeaderboardEntries() function, user information for each leaderboard entry will be immediately available. Steam may also unload each entry's user information automatically. So, this information should be fetched immediately when it becomes available.
This function will return
nil in the following cases:
false, indicating that the application is not currently connected to the Steam client.
steamworks.getUserInfo( [userSteamId] )
String. The unique string ID of the user. The ID will default to the current user if this argument is not provided.
local steamworks = require( "plugin.steamworks" ) -- Called when information about one user has been received or changed local function onUserInfoUpdated( event ) -- Print information about the user local userInfo = steamworks.getUserInfo( event.userSteamId ) if ( userInfo ) then print( "User Name: " .. userInfo.name ) print( "User Nickname: " .. userInfo.nickname ) print( "Steam Level: " .. tostring(userInfo.steamLevel) ) print( "Status: " .. userInfo.status ) print( "Relationship: " .. userInfo.relationship ) end end -- Set up a listener to be invoked when user info has been received or changed steamworks.addEventListener( "userInfoUpdate", onUserInfoUpdated )