X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fimsettings.php;h=90a4fd8074c077e4948984753f94482a33e96ecf;hb=31b5ae1523c4f64159f00b32683912da1a9fb474;hp=18666e1708e9cb691a0151bcc8e4356a6234fdef;hpb=f5caccc8276252edcffa7fb3dc778cba7bc50d0a;p=quix0rs-gnu-social.git diff --git a/actions/imsettings.php b/actions/imsettings.php index 18666e1708..90a4fd8074 100644 --- a/actions/imsettings.php +++ b/actions/imsettings.php @@ -64,7 +64,9 @@ class ImsettingsAction extends SettingsAction { 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')); @@ -148,6 +150,8 @@ class ImsettingsAction extends SettingsAction { function add_address() { + $user = common_current_user(); + $jabber = $this->trimmed('jabber'); # Some validation @@ -191,7 +195,7 @@ class ImsettingsAction extends SettingsAction { # 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, @@ -241,9 +245,10 @@ class ImsettingsAction extends SettingsAction { } $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;