summaryrefslogtreecommitdiffstats
path: root/webapp/actions/user_actions.jsx
diff options
context:
space:
mode:
authorAymaneKhouaji <akhouaji@linagora.com>2017-01-10 11:48:37 +0100
committerGeorge Goldberg <george@gberg.me>2017-01-10 10:48:37 +0000
commit0cba48d155ac0703d6c85e71327d29447c0c8e42 (patch)
treecb569d2cb31b446aed41e35c2e6fc2c3d624b093 /webapp/actions/user_actions.jsx
parent548adb178ec8a97cf517e5da024d98729e86e485 (diff)
downloadchat-0cba48d155ac0703d6c85e71327d29447c0c8e42.tar.gz
chat-0cba48d155ac0703d6c85e71327d29447c0c8e42.tar.bz2
chat-0cba48d155ac0703d6c85e71327d29447c0c8e42.zip
Move instances of Client.updatePassword() in components to an action (#4908) (#5021)
Diffstat (limited to 'webapp/actions/user_actions.jsx')
-rw-r--r--webapp/actions/user_actions.jsx15
1 files changed, 15 insertions, 0 deletions
diff --git a/webapp/actions/user_actions.jsx b/webapp/actions/user_actions.jsx
index 0f5fb0731..a5cef65d8 100644
--- a/webapp/actions/user_actions.jsx
+++ b/webapp/actions/user_actions.jsx
@@ -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);
+ }
+ }
+ );
+}