diff options
author | msquare <msquare@notrademark.de> | 2017-07-23 11:46:54 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2017-07-23 11:46:54 +0200 |
commit | a157004f4aefaa5e2265f852f9432becedee1d66 (patch) | |
tree | c47915a311371afa7aa962655fd5ff1ff2ab5e64 /includes/pages/user_settings.php | |
parent | 36446dd644ff865d1d63aab0ba4c670ce2b277d1 (diff) |
handle failed db queries in Db class
Diffstat (limited to 'includes/pages/user_settings.php')
-rw-r--r-- | includes/pages/user_settings.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/pages/user_settings.php b/includes/pages/user_settings.php index 667e73d9..7edee7b5 100644 --- a/includes/pages/user_settings.php +++ b/includes/pages/user_settings.php @@ -84,6 +84,7 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes) if ($valid) { User_update($user_source); + success(_('Settings saved.')); redirect(page_link_to('user_settings')); } @@ -108,10 +109,9 @@ function user_settings_password($user_source) error(_('Your password is to short (please use at least 6 characters).')); } elseif ($request->post('new_password') != $request->post('new_password2')) { error(_('Your passwords don\'t match.')); - } elseif (set_password($user_source['UID'], $request->post('new_password'))) { - success(_('Password saved.')); } else { - error(_('Failed setting password.')); + set_password($user_source['UID'], $request->post('new_password')); + success(_('Password saved.')); } redirect(page_link_to('user_settings')); } |