- if ($cur->email == $confirm_email->email) {
- $this->client_error(_t('That email address is already confirmed.'));
- return;
- }
-
+ $type = $confirm->address_type;
+ if (!in_array($type, array('email', 'jabber', 'sms'))) {
+ $this->server_error(sprintf(_('Unrecognized address type %s'), $type));
+ return;
+ }
+ if ($cur->$type == $confirm->address) {
+ $this->client_error(_('That address has already been confirmed.'));
+ return;
+ }
+