diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-09-18 07:53:11 -0700 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-09-18 07:53:11 -0700 |
commit | 817b8d151b2a3ad6f3e9758397a6f8d8033e39c3 (patch) | |
tree | dec3bfa51740ef9eb658a1e17e9b5ddd5ba2ccbe /settings/js/personal.js | |
parent | 1eb42626f5fd9f2a39f22efc735820fb83b2778b (diff) | |
parent | 18a2c48ceb2206fbc871dc0c28e5fb233b4fc0fc (diff) | |
download | nextcloud-server-817b8d151b2a3ad6f3e9758397a6f8d8033e39c3.tar.gz nextcloud-server-817b8d151b2a3ad6f3e9758397a6f8d8033e39c3.zip |
Merge pull request #4745 from owncloud/split_personal-user_passwordchange
Split personal and user-mgmt password change logic
Diffstat (limited to 'settings/js/personal.js')
-rw-r--r-- | settings/js/personal.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js index fab32b83b64..eaaca32f5d8 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -124,14 +124,17 @@ $(document).ready(function(){ $('#passwordchanged').hide(); $('#passworderror').hide(); // Ajax foo - $.post( 'ajax/changepassword.php', post, function(data){ + $.post(OC.Router.generate('settings_personal_changepassword'), post, function(data){ if( data.status === "success" ){ $('#pass1').val(''); $('#pass2').val(''); $('#passwordchanged').show(); - } - else{ - $('#passworderror').html( data.data.message ); + } else{ + if (typeof(data.data) !== "undefined") { + $('#passworderror').html(data.data.message); + } else { + $('#passworderror').html(t('Unable to change password')); + } $('#passworderror').show(); } }); |