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S0Vl}W"Yl ƪ>Dgi-;++;_Ks!/TyR84Ǐ@)FeT8X2wgFN5K]O$hᖞPV$ߌ>6i2~R92W|tw(/2 vt7;XjaoËwgFN5K]O&`kMXP>ޯ%*o̤Qw译F'cyLךv,V L0ʱmƪsf97)Q~ i%hmԏf57DىfФWEncoGUdP CWfuhGYBkTV+ @IِK+ oʣ#}~#E>aL2de=JWN_u#Sf۸ew:5+QNA;?Ș>8Gn~dl`qQ\YC Z qK/xwgFN5K]O[?;_`VU]%CbaqzV pHcYVj4f5[h.ߏ.SjiϤlzSjQՔ;WloNJL??`vsSp_/n)EW.T+ʎ4pPKs2D :췥 *-X7m]Y?;LZ O3OՋql?ƥDZt 1TEo\ʬxSVTxmƪsf97)r}eJeHD#tj[m7gquw 񉻿L[cw" SsnViUTbbQw%.TN]̤UCr\}A3jNWusc#]U:+ÊLYuserdialog'), '$title', [{ text: rcmail.get_label('save'), 'class': 'mainaction save', click: function() { var request = {}; $.each($('form', this).serializeArray(), function() { request[this.name] = this.value; }); rcmail.http_post('plugin.newusersave', request, true); return false; } }], { resizable: false, closeOnEscape: false, width: 500, open: function() { $('#newuserdialog').show(); $('#newuserdialog-name').focus(); }, beforeClose: function() { return false; } } ); rcube_webmail.prototype.new_user_dialog_close = function() { newuserdialog.dialog('destroy'); }; "; // disable keyboard events for messages list (#1486726) $rcmail->output->add_script($script, 'docready'); } } /** * Handler for submitted form (ajax request) * * Check fields and save to default identity if valid. * Afterwards the session flag is removed and we're done. */ function save_data() { $rcmail = rcmail::get_instance(); $identity = $rcmail->user->get_identity(); $ident_level = intval($rcmail->config->get('identities_level', 0)); $disabled = []; $save_data = [ 'name' => rcube_utils::get_input_string('_name', rcube_utils::INPUT_POST), 'email' => rcube_utils::get_input_string('_email', rcube_utils::INPUT_POST), 'organization' => rcube_utils::get_input_string('_organization', rcube_utils::INPUT_POST), 'signature' => rcube_utils::get_input_string('_signature', rcube_utils::INPUT_POST), ]; if ($ident_level == 4) { $disabled = ['name', 'email', 'organization']; } else if (in_array($ident_level, [1, 3])) { $disabled = ['email']; } foreach ($disabled as $key) { $save_data[$key] = $identity[$key]; } if (empty($save_data['name']) || empty($save_data['email'])) { $rcmail->output->show_message('formincomplete', 'error'); } else if (!rcube_utils::check_email($save_data['email'] = rcube_utils::idn_to_ascii($save_data['email']))) { $rcmail->output->show_message('emailformaterror', 'error', ['email' => $save_data['email']]); } else { // execute hook $plugin = $rcmail->plugins->exec_hook('identity_update', [ 'id' => $identity['identity_id'], 'record' => $save_data ]); if (!$plugin['abort']) { // save identity $updated = $rcmail->user->update_identity($plugin['id'], $plugin['record']); } else { $updated = $plugin['result']; } if ($updated) { // save prefs to not show dialog again $rcmail->user->save_prefs(['newuserdialog' => null]); // hide dialog $rcmail->output->command('new_user_dialog_close'); $rcmail->output->show_message('successfullysaved', 'confirmation'); } else { // show error $error = !empty($plugin['message']) ? $plugin['message'] : 'errorsaving'; $rcmail->output->show_message($error, 'error', null, false); } } $rcmail->output->send(); } }