Closed (fixed)
Project:
User mailman register
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Aug 2008 at 23:47 UTC
Updated:
2 Feb 2010 at 09:09 UTC
Hi - when you get a moment please check out http://drupal.org/project/mailman_groups
What I'd like to know is whether you'd be willing to help and support some links between the two - currently MG collaborates with UMR via undocumented internals - less than ideal.
Comments
Comment #1
andy inman commentedProbably should say specifically what I need:
* A documented function I can call to subscribe/unsubscribe.
This is because we provide a Group-to-MalingList synchronisation concept - joining the group subscribes you to the list. Leaving the group should unsubscribe you. No code changes required (other than providing a wrapper function, maybe), more a matter of defining the interface.
* For User mailman register to call a function I provide to determine if the user should have access to the list. If not then don't display it as available to subscribe. This requires some code changes, not a lot.
I'd be happy to provide a patch for both of these, just want to know if in principle you'd be willing integrate and support them (I mean support in terms of long term compatibility, not answering support questions!)
Comment #2
andy inman commentedFurther info - this is from an email from me to the client who is sponsoring this development:
Right now, to gain access to a Group-related Mailing List, the user must be both a member of the Group AND assigned to a role which has access to that List (configured in the Access Control page). This is functional, but has two significant drawbacks:
* It's an administrative chore, because every time you create a new Mailing List you will need to give access to the relevant Role AND set the List-Group relationship.
* If you have 100 Mailing Lists then you will have a huge page for your Access Control page, since every single List appears there. Definitely not a fully-scaleable solution.
It seems to me that there should be an OR relationship - a user should be able to access a List if EITHER a member of the related Group OR given access via Access Control. Do you see what I mean, and do you agree? This would mean that in general, Group-related lists would not appear in the Access Control page.
I can't change the way it works right now, this is just for my discussion with the "User mailman register" developer - I'd need minor changes to that module in order to support the above functionality
Comment #3
samuelet commentedAt this moment and till September i can't give you full support because i'm on holiday but,yes, i'll be glad to apply any functional patch or to help into this integration.
About subscribe/unsubscribe function, _user_mailman_register_subscribe should be sufficient.
It update "mailman manager" table (the drupal subscription status) and mailman status (via http request).
For what i remember now, its parameters are:
$account: the user drupal user object (i.e:global $user for current user)
$edit: An array which contains 'option'+the list to which sub/unsub (i.e: $edit['option1'] means the list with id 1 in the mailman manager table)
$deluser: should be true when user is deleted as it automatically delete its mailman subscription.
$umail: the new mail of the user. To set only for new users or when a user changes its mail because it syncronize the user mailman mail.
Comment #4
andy inman commentedThanks for the reply. I'm about to go on holiday myself until September too so won't be doing anything more on this until then.
... after some time looking through your code I successfully used _user_mailman_register_subscribe_update function to subscribe (haven't got unsubscribe functionality implemented yet.) The _user_mailman_register seems to do some kind of re-sync of existing subscriptions, and among other things loads and parses all lists. I was concerned about unneccessary loading (with large numbers of lists.) I'm not clear as to why _user_mailman_register_subscribe does all that processing, and it didn't seem to be useful for a new subscription. Maybe I'm missing something - should I be _user_mailman_register_subscribe instead of the _update version?
Anyway, just wanted to get the ball rolling - I'll be back in touch in September - have a great holiday (as I aim to do!)
Comment #5
samuelet commentedComment #7
andy inman commentedJust in case you've not spotted it: http://drupal.org/project/mailman_api
Comment #8
samuelet commentedThanks for the note, but mailman_api seems to me less accurate than UMR in the comunication with the mailman server.
For example it does not care about wrong admin passwords nor for the different email parameter format used by newer mailman versions.