Permalink
Browse files

Call pas.searchUsers with the 'name' argument instead of 'login'.

'name' is the officially supported way according to the PAS interface.
  • Loading branch information...
1 parent 30b9104 commit 0696105749e72ef57354ec380c250086b30f38c8 @mauritsvanrees mauritsvanrees committed Jan 3, 2013
Showing with 7 additions and 3 deletions.
  1. +3 −3 Products/CMFPlone/RegistrationTool.py
  2. +4 −0 docs/CHANGES.rst
@@ -69,7 +69,7 @@ def get_member_by_login_name(context, login_name, raise_exceptions=True):
# Try to find this user via the login name.
acl = getToolByName(context, 'acl_users')
userids = [user.get('userid') for user in
- acl.searchUsers(login=login_name, exact_match=True)
+ acl.searchUsers(name=login_name, exact_match=True)
if user.get('userid')]
if len(userids) == 1:
userid = userids[0]
@@ -271,11 +271,11 @@ def isMemberIdAllowed(self, id):
if parent.searchPrincipals(id=id,
exact_match=True):
return 0
- # When email address are used as logins, we need to check
+ # When email addresses are used as logins, we need to check
# if there are any users with the requested login.
props = getToolByName(self, 'portal_properties').site_properties
if props.use_email_as_login:
- results = pas.searchUsers(login=id, exact_match=True)
+ results = pas.searchUsers(name=id, exact_match=True)
if results:
return 0
else:
View
@@ -9,6 +9,10 @@ Changelog
4.3a3 (unreleased)
------------------
+- Call searchUsers with the 'name' argument instead of 'login'.
+ 'name' is the officially supported way according to the PAS interface.
+ [maurits]
+
- Changes to dependencies when creating a new site (plone-final) to fix
#11997.
[keul]

0 comments on commit 0696105

Please sign in to comment.