diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-05-27 11:37:16 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-05-27 08:37:16 -0700 |
commit | 5ff85df9e92b5ca2c5cd33d3338e3e04190b09cd (patch) | |
tree | ec5fd7183fbcf3815ee96ec51d927c63f8b86642 /webapp/actions/user_actions.jsx | |
parent | d2aacdbb07c0c0b97c0f45c99cfbbd2f28c56e7b (diff) | |
download | chat-5ff85df9e92b5ca2c5cd33d3338e3e04190b09cd.tar.gz chat-5ff85df9e92b5ca2c5cd33d3338e3e04190b09cd.tar.bz2 chat-5ff85df9e92b5ca2c5cd33d3338e3e04190b09cd.zip |
Display error correctly on ldap to email claim page (#3129)
Diffstat (limited to 'webapp/actions/user_actions.jsx')
-rw-r--r-- | webapp/actions/user_actions.jsx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/webapp/actions/user_actions.jsx b/webapp/actions/user_actions.jsx new file mode 100644 index 000000000..370bfc302 --- /dev/null +++ b/webapp/actions/user_actions.jsx @@ -0,0 +1,22 @@ +// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import Client from 'utils/web_client.jsx'; + +export function switchFromLdapToEmail(email, password, ldapPassword, onSuccess, onError) { + Client.ldapToEmail( + email, + password, + ldapPassword, + (data) => { + if (data.follow_link) { + window.location.href = data.follow_link; + } + + if (onSuccess) { + onSuccess(data); + } + }, + onError + ); +} |