Get User Session ID

<Integer|null> getSessionId()

Returns Integer if user already connected. Otherwise, returns null.

Example

var session = LViS.User.getSessionId();
if (session !== null) {
console.log('User session id is %s', session);
} else {
console.warn('User is not connected yet!');
}