diff --git a/alma.user.inc b/alma.user.inc index 1e30490..684269d 100644 --- a/alma.user.inc +++ b/alma.user.inc @@ -147,7 +147,7 @@ function alma_user_profile_form_submit($form, $form_state) { // Update e-mail address. if ($orig_settings['email'] == TRUE && ($form['account']['mail']['#default_value'] !== $changed_settings['mail'])) { - alma_client_invoke('change_email_address', $creds['name'], $creds['pass'], $orig_settings['email'], $changed_settings['mail']); + alma_client_invoke('change_email_address', $creds['name'], $creds['pass'], $form['account']['mail']['#default_value'], $changed_settings['mail']); $updated = TRUE; } diff --git a/lib/AlmaClient/AlmaClient.class.php b/lib/AlmaClient/AlmaClient.class.php index b3e3e68..9ad2f9d 100644 --- a/lib/AlmaClient/AlmaClient.class.php +++ b/lib/AlmaClient/AlmaClient.class.php @@ -613,9 +613,6 @@ public function change_email_address($borr_card, $pin_code, $email_id, $new_emai 'address' => $new_email, ); - if ($new_number) { - $params['localCode'] = $new_number; - } $doc = $this->request('patron/email/change', $params); return TRUE; }