Commit 78bd5926 by Sebastien Robin

notification tool: get only ERP5 objects when looking for users

parent b70fcf9a
......@@ -291,7 +291,8 @@ class NotificationTool(BaseTool):
portal = self.getPortalObject()
searchUsers = self.acl_users.searchUsers
def getUserValueByUserId(user_id):
user, = searchUsers(id=user_id, exact_match=True)
user, = [x for x in searchUsers(id=user_id, exact_match=True,
login_portal_type=portal.getPortalLoginTypeList()) if 'path' in x]
return portal.unrestrictedTraverse(user['path'])
if notifier_list is None:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment