diff --git a/plugins/register/README.md b/plugins/register/README.md index 9e03891..9016850 100644 --- a/plugins/register/README.md +++ b/plugins/register/README.md @@ -44,16 +44,55 @@ Enable/disable registration in `totalmeet.conf.php`: ## Implementation -Uses simple callable dispatcher pattern for single-action plugin: +Uses callable dispatcher pattern with procedural handler functions: ```php register_plugin_route_prefix('register', [ - 'dispatcher' => function($context) { + 'dispatcher' => function($action, array $context = []) { require_once PLUGIN_REGISTER_PATH . 'controllers/register.php'; + if (function_exists('register_plugin_handle_register')) { + return register_plugin_handle_register($action, $context); + } + return false; }, 'access' => 'public', + 'defaults' => ['action' => 'register'], + 'plugin' => 'register', ]); ``` +## Controller Architecture + +The controller uses procedural functions: +- `register_plugin_handle_register($action, $context)` - main handler +- `register_plugin_handle_submission(...)` - processes form submission +- `register_plugin_render_form(...)` - renders registration form with layout +- `register_plugin_log_success(...)` - logs successful registration + +## Database Tables + +No plugin-specific tables. Uses core `user` and `user_meta` tables. + +## Enable/Disable + +The plugin is managed via the admin plugin management interface (stored in `settings` table). +When disabled, the registration route becomes unavailable. + +## File Structure + +``` +plugins/register/ +├── bootstrap.php # registers route with callable dispatcher +├── plugin.json # plugin metadata +├── README.md # this documentation +├── controllers/ +│ └── register.php # procedural handler functions +├── models/ +│ └── register.php # registration logic and validation +├── helpers.php # plugin helper wrapper +└── views/ + └── form-register.php # registration form template +``` + ## Dependencies None - functions independently. diff --git a/plugins/register/plugin.json b/plugins/register/plugin.json index f9a49c9..177b803 100644 --- a/plugins/register/plugin.json +++ b/plugins/register/plugin.json @@ -1,5 +1,5 @@ { "name": "Registration Plugin", - "version": "1.0.1", + "version": "1.0.2", "description": "Provides registration functionality as a plugin." }