Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
548adb178e
Коммит
0cba48d155
@@ -449,3 +449,18 @@ export function updateActive(userId, active, success, error) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function updatePassword(userId, currentPassword, newPassword, success, error) {
|
||||||
|
Client.updatePassword(userId, currentPassword, newPassword,
|
||||||
|
() => {
|
||||||
|
if (success) {
|
||||||
|
success();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
(err) => {
|
||||||
|
if (error) {
|
||||||
|
error(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ import * as AsyncClient from 'utils/async_client.jsx';
|
|||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
|
|
||||||
|
import {updatePassword} from 'actions/user_actions.jsx';
|
||||||
|
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {FormattedMessage, FormattedTime, FormattedDate} from 'react-intl';
|
import {FormattedMessage, FormattedTime, FormattedDate} from 'react-intl';
|
||||||
@@ -91,7 +93,7 @@ export default class SecurityTab extends React.Component {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Client.updatePassword(
|
updatePassword(
|
||||||
user.id,
|
user.id,
|
||||||
currentPassword,
|
currentPassword,
|
||||||
newPassword,
|
newPassword,
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user