[PatchDiscussion] make plone member email lookup more robust to fix non-mail-out (#1400)

[email protected] (zwiki-repo)
Newsgroups gmane.comp.web.zope.zwiki
Message-ID <20080328151047.1C63978051__29526.01417569$1206717347$gmane$org@mail.joyful.com>
Fri Mar 28 08:09:41 PDT 2008  Simon Michael <[email protected]>
  * make plone member email lookup more robust to fix non-mail-out (#1400)
diff -rN -u old-ZWiki/Mail.py new-ZWiki/Mail.py
--- old-ZWiki/Mail.py	2008-03-28 08:10:45.000000000 -0700
+++ new-ZWiki/Mail.py	2008-03-28 08:10:45.000000000 -0700
@@ -397,7 +397,11 @@
                 # NB doesn't work with CMFMember
                 if safe_hasattr(memberdata,'_members'):
                     member = memberdata._members.get(subscriber,None)
-            email = getattr(member,'email','')
+            # dumb robust fix for http://zwiki.org/1400
+            try:
+                email = member.getProperty('email',getattr(member,'email',''))
+            except AttributeError:
+                email = getattr(member,'email','')
         else:
             email = ''
         return email.lower() or None

--
forwarded from http://zwiki.org/PatchDiscussion#[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.