[Zope-CMF] Changing existing member's email address
Tres Seaver
tseaver@zope.com
Sat, 13 Apr 2002 19:14:18 -0400
Steve Arnold wrote:
> Howdy:
>
> I searched through the CMF dogbowl and read the (short) FAQ, but I
> didn't see anything specific to this; I also browsed everything I could
> find in the ZMI and portal interface, but I couldn't find any visible
> member property where their email address is stored. I could alsmost
> believe CMF forgets the initial email once the notification email is
> sent to a new member, but it has to be somewhere in order for the
> "forgot my password" thing to work.
>
> What if I need to change a member password? Eg, if they enter an
> incorrect password on the portal registration form and the bounce shows
> up in my mail server, I can send the email to the correct address, but
> where do I change it in the portal member data? It has to be stored in
> the ZODB somewhere, right?
The MemberData tool handles that info. Try, in an ExternalMethod:
wrapped = self.portal_membership.getMemberById( member_name )
wrapped.setMemberProperties( { 'email': 'newvalue@example.com' } )
You might be able to use 'setProperties' instead in a PythonScript,
depending on roles. This is what the 'personalize' skin method does,
but it expects to be called by the member themselves.
Tres.
--
===============================================================
Tres Seaver tseaver@zope.com
Zope Corporation "Zope Dealers" http://www.zope.com