diff --git a/plugins/new_user_dialog/README.md b/plugins/new_user_dialog/README.md new file mode 100644 index 00000000000..ea70b8b7469 --- /dev/null +++ b/plugins/new_user_dialog/README.md @@ -0,0 +1,15 @@ +# RoundCube New User Dialog Plugin +When a new user is created, this plugin checks the default identity and sets a session flag in case it is incomplete. An overlay box will appear on the screen until the user has reviewed/completed his identity. + +## Configuration +Optional you can specify the default signature, `@EMAIL@` is replaced by the user email. + +``` +$config['new_user_dialog_signature_text'] = ' +Your Name + +E-Mail : @EMAIL@ +Website: some.domain +Phone: 01234/567890 +'; +``` diff --git a/plugins/new_user_dialog/new_user_dialog.php b/plugins/new_user_dialog/new_user_dialog.php index a63d42ee2c0..fd92eb7c0f2 100644 --- a/plugins/new_user_dialog/new_user_dialog.php +++ b/plugins/new_user_dialog/new_user_dialog.php @@ -19,9 +19,12 @@ class new_user_dialog extends rcube_plugin function init() { + $rcmail = rcmail::get_instance(); + $this->load_config(); $this->add_hook('identity_create', [$this, 'create_identity']); $this->add_hook('render_page', [$this, 'render_page']); $this->register_action('plugin.newusersave', [$this, 'save_data']); + $this->signature_text = $rcmail->config->get('new_user_dialog_signature_text'); } /** @@ -89,6 +92,7 @@ function render_page($p) 'name' => '_signature', 'rows' => '5', ], + $out = str_replace('@EMAIL@', rcube_utils::idn_to_utf8($identity['email']) , $this->signature_text ?? ''), $identity['signature'] ));