diff options
author | Evan Prodromou <evan@controlezvous.ca> | 2008-06-22 10:09:41 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlezvous.ca> | 2008-06-22 10:09:41 -0400 |
commit | 745a145f0dacc0ef04a43157887d322bf37225eb (patch) | |
tree | 746dfe035888818360c90b5111a2002b671f6ee3 /actions/confirmemail.php | |
parent | 676bbebe1a6225d77416a0e3ea57a90b25627ced (diff) |
add better debugging
darcs-hash:20080622140941-34904-2a0eda21f6a374a9d26107a4bc627fc6de2a7063.gz
Diffstat (limited to 'actions/confirmemail.php')
-rw-r--r-- | actions/confirmemail.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/actions/confirmemail.php b/actions/confirmemail.php index 8052452ae..e69cc6fff 100644 --- a/actions/confirmemail.php +++ b/actions/confirmemail.php @@ -47,21 +47,27 @@ class ConfirmemailAction extends Action { $this->client_error(_t('That email address is already confirmed.')); return; } + $cur->query('BEGIN'); + $orig_user = clone($cur); $cur->email = $confirm_email->email; - common_debug('cur email = "' . $cur->email . '"', __FILE__); $result = $cur->update($orig_user); + if (!$result) { - $this->server_error(_t('Error setting email address.')); + common_log_db_error($cur, 'UPDATE', __FILE__); return; } + $result = $confirm_email->delete(); + if (!$result) { - $this->server_error(_t('Error deleting code.')); + common_log_db_error($confirm_email, 'DELETE', __FILE__); return; } + $cur->query('COMMIT'); + common_show_header(_t('Confirm E-mail Address')); common_element('p', NULL, _t('The email address "') . $cur->email . |