Posted by felixsmile on August 30, 2007 at 4:29pm
3 followers
Jump to:
| Project: | Subscriptions |
| Version: | 5.x-2.0-beta6 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hello everyone,
this is what I posted on the forum already, without any reply, however, so I'd be glad if someone could answer it here, maybe.
On my university website, I would like every user of certain roles to be subscribed (using the subscription module) to certain content, based on taxonomy terms.
The users can opt out whenever they want to, but I want to subscribe them initially, at least, to these topics.
Has anyone got any idea how to do this, maybe with some php code?
Thanks a lot in advance,
Felix.
Comments
#1
I would like to see this feature, too, but it's not a small task...
Note: no new development is done in the 1.x branch and the 2.x branch is still under development.
#2
I second
#3
Not a small task, indeed, but a very useful one =D
Maybe someone knows a workaround in the meantime, some code (mySQL or php) I could execute on my database to "manually" add the required users?
#4
In the meantime, my workaround was to update the database manually (the table is called subscriptions) which worked fine, although it's quite a lot of work.
Have a nice day!
Felix.
#5
You can now define sets for subscriptions for the authenticated user and for each role, and these will be assigned at user creation time.
#6
That's cool. Thanks a lot!
For existing users (or if you have to make some changes), I suppose I will still have to use the "old" method (fiddling with the database), is that right?
Happy New Year,
Felix.
#7
No, you can do them one by one at /user/NNN/subscriptions, but if you have to do many of them, you probably want to stay with the database...
Thanks, Happy New Year to you, too!
#8
Sorry I wasn't clear, this is what I meant: for existing users in an existing role, I can't just subscribe all the existing users of a role to a new taxonomy term (for instance, when I create a new taxonomy term and would like some roles to be subscribed to that new term automatically).
Thanks for your answer, I'll stick with the database hacking then (haha, I'm not very good at MySql, so I always export the subscriptions and edit them with OOCalc and Notepad++ =D).
Felix.
#9
No, this doesn't currently work. It's a can of worms. What happens if you add/remove roles to users? What happens if you remove roles from the site? Is it legitimate to add subscriptions to a user (because you've added them to a role that the user has), even though that user has opted out of all originally assigned subscriptions (they don't want to receive email)? What happens if a user has opted out of a subscription and you give them a new role that has that same subscription and adds it again?
EDIT: See http://drupal.org/node/360198#comment-1207178 for one person's answers to these questions...
#10
You're so right (unfortunately =D). I guessed that kind of problem would arise... I hadn't seen the whole extent of the problem though :)
Cheers,
Felix.
#11
Automatically closed -- issue fixed for two weeks with no activity.