mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-03 19:11:22 +01:00
call callback on password update
This commit is contained in:
@@ -266,12 +266,15 @@ define('forum/account/edit', ['forum/account/header', 'uploader'], function(head
|
||||
password_confirm.on('blur', onPasswordConfirmChanged);
|
||||
|
||||
$('#changePasswordBtn').on('click', function() {
|
||||
var btn = $(this);
|
||||
if ((passwordvalid && passwordsmatch) || app.user.isAdmin) {
|
||||
btn.addClass('disabled').find('i').removeClass('hide');
|
||||
socket.emit('user.changePassword', {
|
||||
'currentPassword': currentPassword.val(),
|
||||
'newPassword': password.val(),
|
||||
'uid': ajaxify.variables.get('theirid')
|
||||
}, function(err) {
|
||||
btn.removeClass('disabled').find('i').addClass('hide');
|
||||
currentPassword.val('');
|
||||
password.val('');
|
||||
password_confirm.val('');
|
||||
|
||||
@@ -151,6 +151,7 @@ SocketUser.changePassword = function(socket, data, callback) {
|
||||
targetUid: data.uid,
|
||||
ip: socket.ip
|
||||
});
|
||||
callback();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user