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:
Name
Type
Description
username
string
The EmotivID of the user
currentOSUId
string
The id of the current OS account
currentOSUsername
string
The user name for currentOSUId
loggedInOSUId
string
The id of the OS account used to login in EMOTIV Launcher
loggedInOSUsername
string
The user name for loggedInOSUId
lastLoginTime
string (ISO datetime)
When this user logged in for the last time.
This field was added in Cortex 2.3.0
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
A user is logged in from the current OS account
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.
Last updated