summaryrefslogtreecommitdiffstats
path: root/webapp/components/signup_user_complete.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2016-06-13 15:29:24 -0400
committerJoramWilander <jwawilander@gmail.com>2016-06-13 15:29:24 -0400
commit5af526c259d9c6477d67eb8f8a1e7b86270c7294 (patch)
tree97cc595107026a1f19d6fd6e35627dda23979aa3 /webapp/components/signup_user_complete.jsx
parentbb5ca5a8780f9259306d881e85760de8b87ddea8 (diff)
parent974238231b9cdbd39a825ec8e9299fbb0b51f6b8 (diff)
downloadchat-5af526c259d9c6477d67eb8f8a1e7b86270c7294.tar.gz
chat-5af526c259d9c6477d67eb8f8a1e7b86270c7294.tar.bz2
chat-5af526c259d9c6477d67eb8f8a1e7b86270c7294.zip
Merge branch 'release-3.1'
Conflicts: webapp/components/create_comment.jsx
Diffstat (limited to 'webapp/components/signup_user_complete.jsx')
-rw-r--r--webapp/components/signup_user_complete.jsx34
1 files changed, 28 insertions, 6 deletions
diff --git a/webapp/components/signup_user_complete.jsx b/webapp/components/signup_user_complete.jsx
index b3825f72f..a9d96e320 100644
--- a/webapp/components/signup_user_complete.jsx
+++ b/webapp/components/signup_user_complete.jsx
@@ -173,11 +173,24 @@ export default class SignupUserComplete extends React.Component {
this.state.ldapPassword,
null,
() => {
- GlobalActions.emitInitialLoad(
- () => {
- browserHistory.push('/select_team');
- }
- );
+ if (this.props.location.query.id || this.props.location.query.h) {
+ Client.addUserToTeamFromInvite(
+ this.props.location.query.d,
+ this.props.location.query.h,
+ this.props.location.query.id,
+ () => {
+ this.finishSignup();
+ },
+ () => {
+ // there's not really a good way to deal with this, so just let the user log in like normal
+ this.finishSignup();
+ }
+ );
+
+ return;
+ }
+
+ this.finishSignup();
},
(err) => {
if (err.id === 'ent.ldap.do_login.user_not_registered.app_error' || err.id === 'ent.ldap.do_login.user_filtered.app_error') {
@@ -205,6 +218,15 @@ export default class SignupUserComplete extends React.Component {
);
}
+ finishSignup() {
+ GlobalActions.emitInitialLoad(
+ () => {
+ GlobalActions.loadDefaultLocale();
+ browserHistory.push('/select_team');
+ }
+ );
+ }
+
handleUserCreated(user, data) {
track('signup', 'signup_user_02_complete');
Client.loginById(
@@ -761,4 +783,4 @@ export default class SignupUserComplete extends React.Component {
</div>
);
}
-} \ No newline at end of file
+}