[Zope-CMF] How do I access email property?
seb bacon
seb@jamkit.com
Wed, 18 Apr 2001 16:04:47 +0100
Hi,
All member attributes are exposed as simple properties through a
wrapped Member object, which can be grabbed from the membership_tool.
You can get the Creator of a document through its DublinCore
interface, and you can get the Member object with getMemberById (a
method provided by CMFCore/MembershipTool.py), so an answer is:
<dtml-let member="portal_membership.getMemberById(_.getitem('Creator',1))">
<dtml-var member.email>
</dtml-let>
There may be a nicer way, though.
seb
* Boddy Stephen <Stephen.Boddy@btcellnet.net> [010418 15:46]:
> Hi,
>
> I'm trying to create a link in the standard_html_footer that when clicked on
> will open an email to the owner of the currently viewed object i.e.
>
> documentA is owned by member bob, who has an email property
> robert@builder.com
> A browser comes along who wants to email bob to tell him that his JCB specs
> are out of date.
> A link at the footer of the page should point to "mailto:robert@builder.com"
>
> Using <dtml-if owner_info><dtml-with owner_info mapping> I can get the last
> mod time, and the owner id (bob). How do I pull the owners email? Do I have
> to resort to editing the python code?
>
> On a related issue, it's easy enough to get the last modification date, is
> it as easy to get the last modifiers id and email property, or do I have to
> start messing with the undoable_transactions (if memory serves)?
>
> Thanks in advance
> Steve
>
>
>
> **********************************************************************
> This email and any attachments may be confidential and the subject of
> legal professional privilege. Any disclosure, use, storage or copying
> of this email without the consent of the sender is strictly prohibited.
> Please notify the sender immediately if you are not the intended
> recipient and then delete the email from your inbox and do not
> disclose the contents to another person, use, copy or store the
> information in any medium.
> **********************************************************************
>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature requests
--
[] j a m k i t
seb bacon
T: 020 7749 7218
F: 020 7739 8683
M: 07968 301 336
W: www.jamkit.com