summaryrefslogtreecommitdiffstats
path: root/webapp/components/logged_in.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/logged_in.jsx')
-rw-r--r--webapp/components/logged_in.jsx16
1 files changed, 1 insertions, 15 deletions
diff --git a/webapp/components/logged_in.jsx b/webapp/components/logged_in.jsx
index 9282e74ca..8d7a00653 100644
--- a/webapp/components/logged_in.jsx
+++ b/webapp/components/logged_in.jsx
@@ -26,7 +26,6 @@ export default class LoggedIn extends React.Component {
super(params);
this.onUserChanged = this.onUserChanged.bind(this);
- this.setupUser = this.setupUser.bind(this);
// Because current CSS requires the root tag to have specific stuff
$('#root').attr('class', 'channel-view');
@@ -45,9 +44,7 @@ export default class LoggedIn extends React.Component {
user: UserStore.getCurrentUser()
};
- if (this.state.user) {
- this.setupUser(this.state.user);
- } else {
+ if (!this.state.user) {
GlobalActions.emitUserLoggedOutEvent('/login');
}
}
@@ -56,21 +53,10 @@ export default class LoggedIn extends React.Component {
return this.state.user != null;
}
- setupUser(user) {
- // Update segment indentify
- if (global.window.mm_config.SegmentDeveloperKey != null && global.window.mm_config.SegmentDeveloperKey !== '') {
- global.window.analytics.identify(user.id, {
- createdAt: user.create_at,
- id: user.id
- });
- }
- }
-
onUserChanged() {
// Grab the current user
const user = UserStore.getCurrentUser();
if (!Utils.areObjectsEqual(this.state.user, user)) {
- this.setupUser(user);
this.setState({
user
});