I took me an hour to figure out that member.setProperties()
isn't the only game in town. There's also member.setMemberProperties()
. If you've grabbed a member (in my case by iteration over all members in a site and checking whether some memberdata value needs to be migrated), the following is true:
member.setProperties()
sets the properties on the currently authenticated uses. So if "reinout" is logged in and I'm calling setProperties()
on the member "maurits", it are still reinout's properties that are getting set. What?? member.getProperty
properly gets member's properties instead of those of the currently authenticated user.member.setMemberProperties()
actually sets the properties on member.This one surprised me.
My name is Reinout van Rees and I program in Python, I live in the Netherlands, I cycle recumbent bikes and I have a model railway.
Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):