function simplenews_roles_cron in Simplenews Roles 6.2
Same name and namespace in other branches
- 5 simplenews_roles.module \simplenews_roles_cron()
- 6 simplenews_roles.module \simplenews_roles_cron()
- 7 simplenews_roles.module \simplenews_roles_cron()
Implementation of hook_cron().
File
- ./
simplenews_roles.module, line 46 - Simplenews Roles module
Code
function simplenews_roles_cron() {
// Only sync if it's been requested.
if (variable_get('simplenews_roles_need_sync', FALSE)) {
foreach (variable_get('simplenews_roles_tids_rids', array()) as $tid => $rids) {
simplenews_roles_update_subscriptions($tid, $rids);
}
// Reset sync request.
variable_set('simplenews_roles_need_sync', FALSE);
}
}