{"id":25209765,"url":"https://github.com/backdrop-contrib/simplenews_roles","last_synced_at":"2026-02-11T11:32:59.795Z","repository":{"id":262792086,"uuid":"888364401","full_name":"backdrop-contrib/simplenews_roles","owner":"backdrop-contrib","description":"The Simplenews Roles module for Backdrop CMS synchronizes user subscriptions to newsletters based on their role membership.","archived":false,"fork":false,"pushed_at":"2024-11-14T23:43:12.000Z","size":41,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"1.x-1.x","last_synced_at":"2025-04-05T05:27:40.029Z","etag":null,"topics":["backdrop","backdropcms","newsletters","simplenews"],"latest_commit_sha":null,"homepage":"https://backdropcms.org/project/simplenews_roles","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/backdrop-contrib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-14T09:19:17.000Z","updated_at":"2024-11-15T18:45:16.000Z","dependencies_parsed_at":"2025-04-05T05:36:20.104Z","dependency_job_id":null,"html_url":"https://github.com/backdrop-contrib/simplenews_roles","commit_stats":null,"previous_names":["backdrop-contrib/simplenews_roles"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/backdrop-contrib/simplenews_roles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backdrop-contrib%2Fsimplenews_roles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backdrop-contrib%2Fsimplenews_roles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backdrop-contrib%2Fsimplenews_roles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backdrop-contrib%2Fsimplenews_roles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/backdrop-contrib","download_url":"https://codeload.github.com/backdrop-contrib/simplenews_roles/tar.gz/refs/heads/1.x-1.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backdrop-contrib%2Fsimplenews_roles/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271103202,"owners_count":24699646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backdrop","backdropcms","newsletters","simplenews"],"created_at":"2025-02-10T13:18:30.651Z","updated_at":"2026-02-11T11:32:54.760Z","avatar_url":"https://github.com/backdrop-contrib.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simplenews Roles Module for Backdrop CMS\n\nThe Simplenews Roles module for Backdrop CMS synchronizes user subscriptions to newsletters based on their role membership. This module allows automatic subscription/unsubscription of users to specific newsletters by associating user roles with newsletters, ensuring that only users with the specified roles are subscribed. Additionally, users manually added to a subscription list will be automatically removed if they do not belong to the designated roles (unless auto-remove is disabled).\n\n## Features\n\n- **Automatic Role-based Subscriptions**: Automatically subscribe users to newsletters based on their roles.\n- **Auto-Remove**: Optionally remove users who no longer belong to the subscribed roles.\n- **Synchronization via Cron**: Supports regular synchronization of subscriptions through cron jobs.\n- **Configuration**: Define role-based subscriptions in the module's settings and set limits for subscribe/unsubscribe operations per cron run.\n\n## Installation\n\n1. Place the `simplenews_roles` directory in your Backdrop CMS `modules` directory.\n2. Enable the module in the **Modules** section of the Backdrop CMS admin.\n3. Navigate to **Configuration** \u003e **Simplenews Roles Settings** to configure role-based newsletter subscriptions.\n\n## Configuration\n\n1. Go to Configuration \u003e Newsletters \u003e edit newsletter category \u003e Role synchronization, and configure your role-to-newsletter mappings.\n2. Select the roles that should be automatically subscribed to each newsletter.\n3. Enable or disable the **Auto Remove** option for each newsletter.\n\n## Usage\n\n### Adding Role Synchronization to Newsletters\n\nWhen adding or editing a newsletter, a **Role Synchronization** fieldset will appear:\n- **Roles**: Select which user roles should be automatically subscribed to this newsletter.\n- **Auto Remove**: Enabling this option will remove users from the newsletter if they lose the specified role(s).\n\n### Syncing User Subscriptions\n\nSubscriptions are synchronized on each save of the newsletter settings. Additionally, Backdrop’s cron will automatically synchronize subscriptions based on the configuration.\n\n## API Functions\n\n- **simplenews_roles_update_subscriptions**: Manually synchronize users and newsletters based on their roles.\n- **simplenews_roles_user_insert** and **simplenews_roles_user_update**: Automatically handle subscriptions when a user is created or updated.\n\n## Hooks Implemented\n\n- **hook_config_info**: Defines configuration settings for Simplenews Roles.\n- **hook_form_FORM_ID_alter**: Adds role synchronization settings to the newsletter form.\n- **hook_user_insert** and **hook_user_update**: Syncs user subscriptions based on roles when users are created or updated.\n- **hook_cron**: Handles ongoing subscription synchronization via cron.\n- **hook_autoload_info**: Provides autoloading for this module.\n\n## Notes\n\n- **Performance**: Enabling auto-remove on large sites may impact performance, as removing users based on role changes can be a resource-intensive process. Consider limiting synchronization frequency using cron settings.\n- **Compatibility**: This module is designed specifically for Backdrop CMS and is a conversion from a previous Drupal 7 module.\n\n## Troubleshooting\n\nBugs and Feature requests should be reported in the Issue Queue:\nhttps://github.com/backdrop-contrib/simplenews_roles/issues.\n\n## Maintainers\n\nThis module is ported from Drupal 7 version and maintained by [Alan Mels](https://github.com/alanmels) of [AltaGrade.com](https://www.altagrade.com) and is open to contributions. Please feel free to submit issues and feature requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackdrop-contrib%2Fsimplenews_roles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbackdrop-contrib%2Fsimplenews_roles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackdrop-contrib%2Fsimplenews_roles/lists"}