You can use the
getUserId function to retrieve the unique user ID of the current player. It will return 0 if the user is not signed in.
Please note that to securely authenticate a player, you should use the server-side authentication API.
The user ID of the current user.
var userId:Number = kongregate.services.getUserId();
var userId = kongregate.services.getUserId();