Skip to content

Commit

Permalink
Tag inspectlet sesssions with userid, and whether logged in or not
Browse files Browse the repository at this point in the history
  • Loading branch information
edwh committed Jun 21, 2018
1 parent 9b735d7 commit 964610d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions http/js/iznik/views/pages/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,17 @@ define([
// Put self page in. Need to know whether we're logged in first, in order to start the
// chats, which some pages may rely on being active.
self.listenToOnce(Iznik.Session, 'isLoggedIn', function (loggedIn) {
try {
global.__insp.push(['tagSession', loggedIn ? 'LoggedIn' : 'LoggedOut']);
} catch (e) {}

if (loggedIn) {
var me = Iznik.Session.get('me');

try {
global.__insp.push(['identify', Iznik.Session.get('me').id]);
} catch (e) {}

if (!self.noEmailOk && !me.email) {
// We have no email. This can happen for some login types. Force them to provide one.
require(["iznik/views/pages/user/settings"], function() {
Expand Down

0 comments on commit 964610d

Please sign in to comment.