Re: [Mailman-Users] unsubscribe_policy problem? (fixed, includes a patch)

Hello again, anyone didn't reply to me so I fixed this by myself, here is the patch: --- Mailman/Cgi/options.py~ Thu Oct 30 12:02:41 2003 +++ Mailman/Cgi/options.py Thu Oct 30 11:44:55 2003 @@ -156,9 +156,22 @@ def main(): if cgidata.has_key('login-unsub'): # Because they can't supply a password for unsubscribing, we'll need # to do the confirmation dance. + if mlist.isMember(user): - mlist.ConfirmUnsubscription(user, userlang) - doc.addError(_('The confirmation email has been sent.'), tag='') + # If we're doing admin-approved unsubs, don't worry about the password + if mlist.unsubscribe_policy: + try: + mlist.Lock() + try: + mlist.DeleteMember(user, 'via the listinfo page', userack=1) + except Errors.MMNeedApproval: + doc.addError(_('Your unsubscription request has been forwarded to the list administrator for approval.'), tag='') + mlist.Save() + finally: + mlist.Unlock() + else: + mlist.ConfirmUnsubscription(user, userlang) + doc.addError(_('The confirmation email has been sent.'), tag='') else: # Not a member if mlist.private_roster == 0: On Thu, 30 Oct 2003, Pasi Sjoholm wrote:

On Thu, 2003-10-30 at 05:11, Pasi Sjoholm wrote:
anyone didn't reply to me so I fixed this by myself, here is the patch:
Applied, with some modification, to CVS. It will be part of 2.1.4.
Thanks, -Barry

On Thu, 2003-10-30 at 05:11, Pasi Sjoholm wrote:
anyone didn't reply to me so I fixed this by myself, here is the patch:
Applied, with some modification, to CVS. It will be part of 2.1.4.
Thanks, -Barry
participants (2)
-
Barry Warsaw
-
Pasi Sjoholm