common_element_start('p');
common_element('span', 'address unconfirmed', $confirm->address);
common_element('span', 'input_instructions',
- _t('Current confirmed Jabber/GTalk address.'));
+ _t('Awaiting confirmation on this address. Check your ' .
+ 'Jabber/GTalk account for a message with further ' .
+ 'instructions.'));
common_hidden('jabber', $confirm->address);
common_element_end('p');
common_submit('cancel', _t('Cancel'));
common_element('h2', NULL, _t('Preferences'));
common_checkbox('jabbernotify',
- _t('Send me notices through Jabber/GTalk.'));
+ _t('Send me notices through Jabber/GTalk.'),
+ $user->jabbernotify);
common_checkbox('updatefrompresence',
- _t('Post a notice when my Jabber/GTalk status changes.'));
+ _t('Post a notice when my Jabber/GTalk status changes.'),
+ $user->updatefrompresence);
common_submit('save', _t('Save'));
common_element_end('form');
function add_address() {
+ $user = common_current_user();
+
$jabber = $this->trimmed('jabber');
# Some validation
# XXX: optionally queue for offline sending
if (!jabber_is_subscribed($jabber)) {
- jabber_special_presence('subscribe', $address);
+ jabber_special_presence('subscribe', $jabber);
} else {
jabber_confirm_address($confirm->code,
$user->nickname,
}
$user->query('BEGIN');
+ $original = clone($user);
$user->jabber = NULL;
$result = $user->updateKeys($original);
- if ($result === FALSE) {
+ if (!$result) {
common_log_db_error($user, 'UPDATE', __FILE__);
common_server_error(_t('Couldnt update user.'));
return;