Fix pre-auth properties in user list

This commit is contained in:
Bryan Ashby 2022-08-23 16:56:40 -06:00
parent 4d6bc98a0f
commit edfc2f68a4
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
1 changed files with 8 additions and 6 deletions

View File

@ -85,13 +85,15 @@ function getActiveConnectionList(
// //
// There may be a connection, but not a logged in user as of yet // There may be a connection, but not a logged in user as of yet
// //
if (ac.user.isAuthenticated()) { entry.text = ac.user?.username || 'N/A';
entry.text = ac.user.username; entry.userName = ac.user?.username || 'N/A';
entry.userName = ac.user.username; entry.realName = ac.user?.getProperty(UserProps.RealName) || 'N/A';
entry.realName = ac.user.properties[UserProps.RealName]; entry.location = ac.user?.getProperty(UserProps.Location) || 'N/A';
entry.location = ac.user.properties[UserProps.Location]; entry.affils = entry.affiliation =
entry.affils = entry.affiliation = ac.user.properties[UserProps.Affiliations]; ac.user?.getProperty(UserProps.Affiliations) || 'N/A';
if (ac.user.isAuthenticated()) {
// :TODO: track pre-auth time so we can properly track this
const diff = now.diff( const diff = now.diff(
moment(ac.user.properties[UserProps.LastLoginTs]), moment(ac.user.properties[UserProps.LastLoginTs]),
'minutes' 'minutes'