User Info

The TeamSQL SDK provides you with the ability to access basic user information (specifically, for the person using TeamSQL). You can access this information using the user class.

-getUser(callback: (user: User) => void): void

The getUser function accepts one parameter, which is a callback function, and returns the user class.

The user class has 2 properties:

id: ( number ) The unique ID of the user

email: ( string ) The email address of the user

Sample Usage

User.getUser((_user: User) => {
    console.log(_user.email);
    console.log(_user.id);
});

results matching ""

    No results matching ""