Re: how can a logged_in member change his password

Anahide Tchertchian <[email protected]>
Newsgroups gmane.comp.web.zope.cps.devel
Message-ID <[email protected]>
Joachim Schmitz a écrit :
> I want to change the password of a logged_in user from a script.
> 
> I did member.setPassword(newpw), but that fails with:
> CPS-3.4.2

Hi,

I suggest you make the changde by calling the same API that would be 
called when a user changes its password on its preferences page:

members = portal_directories['members']
entry = {
   'id': member_id,
   'password': 'new_password',
   }
members.editEntry(entry)

(not tested)

Regards,

-- 
Anahide Tchertchian, Nuxeo
Mail: [email protected] - Tel: +33 (0)1 40 33 71 60
http://www.nuxeo.com - http://www.cps-project.org
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel
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.