diff options
| author | bwarsaw | 2001-07-29 21:26:49 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-07-29 21:26:49 +0000 |
| commit | 15413c9260712e7ea781b36c05181c75e2b54b2a (patch) | |
| tree | ee484276ec1d96964f3853549ddeb24298fe39ea | |
| parent | 9826c087167cff16ac48358cddf35408df1f3f78 (diff) | |
| download | mailman-15413c9260712e7ea781b36c05181c75e2b54b2a.tar.gz mailman-15413c9260712e7ea781b36c05181c75e2b54b2a.tar.zst mailman-15413c9260712e7ea781b36c05181c75e2b54b2a.zip | |
| -rwxr-xr-x | bin/clone_member | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/bin/clone_member b/bin/clone_member index 095295f25..f40972301 100755 --- a/bin/clone_member +++ b/bin/clone_member @@ -126,42 +126,18 @@ def dolist(mlist, options): print _(' address not found:'), options.fromaddr return - # XXX change this stuff to use changeMemberAddress() - # FIXME - - # Get the user's current options and password. Ugly hack: if a user's - # options would have been zero, then Mailman saves room by deleting the - # entry for the user from the user_options dictionary. Note that /really/ - # it would be better if GetUserOption() and SetUserOption() supported an - # interface to get the entire option value. - flags = mlist.user_options.get(options.lfromaddr, 0) - password = mlist.passwords[options.lfromaddr] - - # now add the new user + # Now change the membership address try: if options.modify: - mlist.ApprovedAddMember(options.toaddr, password, digest, 0) + mlist.changeMemberAddress(options.fromaddr, options.toaddr, + not options.remove) if not options.quiet: print _(' clone address added:'), options.toaddr except Errors.MMAlreadyAMember: if not options.quiet: print _(' clone address is already a member:'), options.toaddr - # hack the account flags - ltoaddr = options.toaddr.lower() - if not flags: - try: - del mlist.user_options[ltoaddr] - except KeyError: - # the user's options were already zero - pass - else: - mlist.user_options[ltoaddr] = flags - - # perhaps remove the original address if options.remove: - if options.modify: - mlist.DeleteMember(options.fromaddr, userack=0) print _(' original address removed:'), options.fromaddr |
