summaryrefslogtreecommitdiff
path: root/identity_addresses.php
diff options
context:
space:
mode:
Diffstat (limited to 'identity_addresses.php')
-rw-r--r--identity_addresses.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/identity_addresses.php b/identity_addresses.php
new file mode 100644
index 0000000..600c450
--- /dev/null
+++ b/identity_addresses.php
@@ -0,0 +1,42 @@
+<?php
+class identity_addresses extends rcube_plugin {
+ public $task = 'settings';
+ private $rc;
+
+ function init() {
+ $this->rc = rcmail::get_instance();
+
+ $this->load_config();
+
+ $this->add_hook('identity_form', array($this, 'fix_form'));
+ $this->add_hook('identity_create', array($this, 'validate_create'));
+ $this->add_hook('identity_update', array($this, 'validate_update'));
+ }
+
+ function fix_form($form, $record) {
+ echo 'Form: ';
+ var_dump($form);
+ echo PHP_EOL . 'Record: ';
+ var_dump($record);
+ die(PHP_EOL);
+ }
+
+ function validate_create($login, $record) {
+ echo 'Login: ';
+ var_dump($login);
+ echo PHP_EOL . 'Record: ';
+ var_dump($record);
+ die(PHP_EOL);
+ }
+
+ function validate_update($id, $record) {
+ echo 'ID: ';
+ var_dump($id);
+ echo PHP_EOL . 'Record: ';
+ var_dump($record);
+ die(PHP_EOL);
+ }
+
+ function validate_modification() {}
+}
+?>