getUserLogin

Get the current logged in user.

There is no login or logout API in Cortex. Instead, users are required to login through the EMOTIV Launcher.

Parameters

This method has no parameter.

Result

The result is an array of objects, each object describes a logged in user. If no user is logged in, then the result is an empty array.

Please note that currently, Cortex is a single user system. Only one user can login at a time, so the result contains at most one object.

The user object includes these fields:

If currentOSUId is equal to loggedInOSUId, then the user is already logged in and can work with Cortex. If currentOSUId is different from loggedInOSUId, then a user is logged into Cortex, but from a different OS account. So the user of the current OS account cannot work with Cortex, and must check EMOTIV Launcher.

Examples

No user is logged in

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "getUserLogin"
}

A user is logged in from the current OS account

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "getUserLogin"
}

A user is logged in from another OS account

The application is connected to Cortex that belongs to the OS account 501/jsnow. But someone has already logged in to Cortex from OS account 502/astark with the EmotivID aria.stark. So, the application cannot work with Cortex.

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "getUserLogin"
}

Last updated