Maurits van Rees wrote: > Alexander Limi, on 2006-09-20: >> This only sets the default value, it doesn't iterate through existing >> members, does it? > > No it doesn't. But the question was how to set the default value so > new users will have this as the default, so that's okay. :) > > I don't have any code lying around for iterating through all users for > this.
I've got some. It's from before you joined Zest, Maurits :-) Below code is from an external method, it was placed as 'switchToKupu.py' inside a product's 'Extensions/' directory. Ah, and of course you should change kupu to fck: this was for moving users from Epoz to Kupu :-) def switchToKupu(self): out = [] # Collect members pm = self.portal_membership for memberId in pm.listMemberIds(): member = pm.getMemberById(memberId) editor = member.getProperty('wysiwyg_editor', None) if editor == 'Kupu': out.append('%s: Kupu already selected, leaving alone' % memberId) else: member.setMemberProperties({'wysiwyg_editor': 'Kupu'}) out.append('%s: Kupu has been set' % memberId) return "\n".join(out) Reinout -- Reinout van Rees r.van.rees @ zestsoftware.nl http://vanrees.org/weblog/ http://zestsoftware.nl/ "Military engineers build missiles. Civil engineers build targets." _______________________________________________ Setup mailing list Setup@lists.plone.org http://lists.plone.org/mailman/listinfo/setup