[CPS-devel] how can a logged_in member change his password

Joachim Schmitz js at aixtraware.de
Tue Sep 12 14:45:52 CEST 2006


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

Traceback (innermost last):
   Module ZPublisher.Publish, line 115, in publish
   Module ZPublisher.mapply, line 88, in mapply
   Module ZPublisher.Publish, line 41, in call_object
   Module Shared.DC.Scripts.Bindings, line 311, in __call__
   Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
   Module Products.CMFCore.FSPageTemplate, line 195, in _exec
   Module Products.CMFCore.FSPageTemplate, line 134, in pt_render
   Module Products.PageTemplates.PageTemplate, line 104, in pt_render
    - <FSPageTemplate at /srp/logged_in used for /srp/campus/students>
   Module TAL.TALInterpreter, line 238, in __call__
  <snip>
   Module TAL.TALInterpreter, line 442, in do_optTag
   Module TAL.TALInterpreter, line 437, in no_tag
   Module TAL.TALInterpreter, line 281, in interpret
   Module TAL.TALInterpreter, line 507, in do_setLocal_tal
   Module Products.PageTemplates.TALES, line 221, in evaluate
    - URL: file:WAeUP_SRP/skins/waeup_custom/cpsskins_lib.pt
    - Line 5, Column 4
    - Expression: <PythonExpr 
content.render_cache(options=options,shield=shield, context_obj=here, 
enable_esi=enable_esi, boxedit=boxedit, template=template)>
    - Names:
       {'container': <CPSDefaultSite at /srp>,
        'context': <ProxyBTreeFolder at /srp/campus/students>,
        'default': <Products.PageTemplates.TALES.Default instance at 
0xb71cdf2c>,
        'here': <ProxyBTreeFolder at /srp/campus/students>,
        'loop': <Products.PageTemplates.TALES.SafeMapping object at 
0xb36f8b6c>,
        'modules': 
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 
0xb717652c>,
        'nothing': None,
        'options': {'args': ()},
        'repeat': <Products.PageTemplates.TALES.SafeMapping object at 
0xb36f8b6c>,
        'request': <HTTPRequest, 
URL=http://srp.aixtraware.de/students/logged_in>,
        'root': <Application at >,
        'template': <FSPageTemplate at /srp/logged_in used for 
/srp/campus/students>,
        'traverse_subpath': [],
        'user': <CPSUser G146532>}
   Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
    - __traceback_info__: 
content.render_cache(options=options,shield=shield, context_obj=here, 
enable_esi=enable_esi, boxedit=boxedit, template=template)
   Module Python expression 
"content.render_cache(options=options,shield=shield, context_obj=here, 
enable_esi=enable_esi, boxedit=boxedit, template=template)", line 1, in 
<expression>
   Module Products.CPSSkins.PortalBoxGroup, line 315, in render_cache
   Module Products.CPSSkins.PortalBoxGroup, line 259, in render
   Module Products.CPSPortlets.CPSPortlet, line 495, in render_cache
   Module Products.CPSDocument.CPSDocument, line 68, in render
   Module Products.CPSDocument.FlexibleTypeInformation, line 753, in 
renderObject
   Module Products.CPSDocument.FlexibleTypeInformation, line 715, in 
_renderLayouts
   Module Products.CPSSchemas.Layout, line 391, in renderLayoutStructure
   Module Products.CPSSchemas.BasicWidgets, line 2135, in render
   Module Products.CPSPortlets.PortletWidgets.MainContentWidget, line 
27, in renderMainContent
   Module Products.CMFCore.FSPageTemplate, line 134, in pt_render
   Module Products.PageTemplates.PageTemplate, line 104, in pt_render
    - <FSPageTemplate at /srp/logged_in used for /srp/campus/students>
   Module TAL.TALInterpreter, line 238, in __call__
<snipp>
  Module TAL.TALInterpreter, line 457, in do_optTag_tal
   Module TAL.TALInterpreter, line 442, in do_optTag
   Module TAL.TALInterpreter, line 437, in no_tag
   Module TAL.TALInterpreter, line 281, in interpret
   Module TAL.TALInterpreter, line 507, in do_setLocal_tal
   Module Products.PageTemplates.TALES, line 221, in evaluate
    - URL: file:WAeUP_SRP/skins/waeup_custom/logged_in.pt
    - Line 40, Column 10
    - Expression: <PythonExpr 
context.process_waeup_login(member=member,sc_pin=request.get('sc_pin',None))>
    - Names:
       {'container': <CPSDefaultSite at /srp>,
        'context': <ProxyBTreeFolder at /srp/campus/students>,
        'default': <Products.PageTemplates.TALES.Default instance at 
0xb71cdf2c>,
        'here': <ProxyBTreeFolder at /srp/campus/students>,
        'loop': <Products.PageTemplates.TALES.SafeMapping object at 
0xb2b45b8c>,
        'modules': 
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 
0xb717652c>,
        'nothing': None,
        'options': {'args': ()},
        'repeat': <Products.PageTemplates.TALES.SafeMapping object at 
0xb2b45b8c>,
        'request': <HTTPRequest, 
URL=http://srp.aixtraware.de/students/logged_in>,
        'root': <Application at >,
        'template': <FSPageTemplate at /srp/logged_in used for 
/srp/campus/students>}
   Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
    - __traceback_info__: 
context.process_waeup_login(member=member,sc_pin=request.get('sc_pin',None))
   Module Python expression 
"context.process_waeup_login(member=member,sc_pin=request.get('sc_pin',None))", 
line 1, in <expression>
   Module Products.CMFCore.FSPythonScript, line 108, in __call__
   Module Shared.DC.Scripts.Bindings, line 311, in __call__
   Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
   Module Products.CMFCore.FSPythonScript, line 164, in _exec
   Module None, line 23, in process_waeup_login
    - <FSPythonScript at /srp/process_waeup_login used for 
/srp/campus/students>
    - Line 23
   Module Products.CMFCore.MembershipTool, line 98, in setPassword
   Module Products.CPSUserFolder.CPSMemberDataTool, line 226, in 
setSecurityProfile
NotImplementedError

-- 
Mit freundlichen Grüßen                                Joachim Schmitz
......................................................................
AixtraWare eK ..Joachim Schmitz ..www.aixtraware.de ..t: +49-2464-8851
Hüsgenstr. 33a .....d-52457 Aldenhoven .............f: +49-2464-905163





This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.