summaryrefslogtreecommitdiffstats
path: root/webapp/actions/user_actions.jsx
blob: 2f6eb9942a408373d31117f7fedeb0bc11ed4024 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

import Client from 'utils/web_client.jsx';
import * as AsyncClient from 'utils/async_client.jsx';

import TeamStore from 'stores/team_store.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
    );
}

export function getMoreDmList() {
    AsyncClient.getProfilesForDirectMessageList();
    AsyncClient.getTeamMembers(TeamStore.getCurrentId());
}