acl_users.getUserById always returns a valid user.

Jose Luis de la Rosa Triviño <[email protected]>
Newsgroups gmane.comp.web.zope.cps.devel
Message-ID <[email protected]>
Hello everybody,

I have a CPS site using a meta directory for members with an sql 
directory and zodb directory as backing directories. The fact is that 
when a user tries to login the method isMemberIdAllowed of 
CPSRegistrationTool always says 0 because membership.getMemberById 
always returns a not None user. I have been debugging and even acl_users 
returns a user even if the identifier of the user does not exists.

May somebody help me on this?

This are some lines of the debugging tests:

{{{
(Pdb) list
 74                 return 0
 75             if not match(self.allowed_member_id_pattern, id):
 76                 return 0
 77             membership = getToolByName(self, 'portal_membership')
 78             import pdb; pdb.set_trace()
 79  ->         if (membership.getMemberById(id) is not None
 80                     # Added: no duplicate home folder
 81                     or membership.homeFolderExists(id)):
 82                 return 0
 83             return 1
 84
(Pdb) membership.acl_users.getUserById('whateverMemberThatDoesNotExist')
<CPSUser whateverMemberThatDoesNotExist>
(Pdb) membership.acl_users.getUserById('whateverMemberThatDoesNotExist')
<CPSUser whateverMemberThatDoesNotExist>
(Pdb) membership._huntUser('whateverMemberThatDoesNotExist', membership)
<CPSUser whateverMemberThatDoesNotExist>
(Pdb) membership.getMemberById('whateverMemberThatDoesNotExist')
<CPSMemberData at 
/portalmir/portal_memberdata/whateverMemberThatDoesNotExist used for 
/portalmir/acl_users>
(Pdb)
}}}

Thank you very much.

Jose Luis.

_______________________________________________
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.