I'm trying to fetch list of users present in my portal, through this
Page Template Code for performing some custom action :
/ *<div metal:define-macro="portlet"
where, *search_myusers, *is a Python script , whose code is as below :
*/from Products.CMFCore.utils import getToolByName
from DateTime import DateTime
portal_membership = getToolByName(context, 'portal_membership')
cur_day = DateTime().day()
cur_month = DateTime().month()
for i in portal_membership.listMemberIds():
member = portal_membership.getMemberById(i)
name = membro.getProperty('fullname', '')
dateofbirth = membro.getProperty('dateofbirth', '')
day = DateTime(data).day()
month = DateTime(data).month()
if cur_day == day and cur_month == month:
I've also configured *LDAP*, and authentication will be performed from
I can see all Users (including those on LDAP) , in plone_control_panel
-> List All Users, *but not inside acl_users (dont know why).
acl_users/source_users *only shows internal users.
*Now My problem/scenario is that , the above script is working fine
for all users, created inside portal itself. But, not working for LDAP
ie, if i've 50 users on my Plone site, out of which, 20 were created
thru plone portal itself& rest 30 users were present on LDAP server,
then, my above script is working fine& fetching those 20 users, but
not doing anything for rest 30 LDAP users.
I hope my scenario is now clear.
Is there any functionality (in script), which is not working for LDAP
*Version Info :*
* Plone 3.3.2
* CMF 2.1.2
* Zope (Zope 2.10.9-final, python 2.4.6, linux2)
* Python 2.4.6 (#1, Jun 23 2010, 11:05:39) [GCC 4.1.2 20070925
(Red Hat 4.1.2-27)]
* PIL 1.1.6
Any help is appreciated !!