From 0cbcced7c36ee95a9c369579b1bf2b9b3e31a768 Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Thu, 21 Nov 2024 02:48:48 -0500 Subject: spitballing --- .gitignore | 5 +++++ config.inc.php.dist | 26 ++++++++++++++++++++++++++ identity_addresses.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 .gitignore create mode 100644 config.inc.php.dist create mode 100644 identity_addresses.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a9e8e02 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +composer.phar +/vendor/ + +# Config +config.inc.php diff --git a/config.inc.php.dist b/config.inc.php.dist new file mode 100644 index 0000000..2759a34 --- /dev/null +++ b/config.inc.php.dist @@ -0,0 +1,26 @@ + 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 @@ +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() {} +} +?> -- cgit v1.2.3