Discussion:
[Zope-PAS] any examples of adding a property to a user?
Rick Hurst
2009-02-06 17:13:38 UTC
Permalink
ok, now i'm up and running, my next task is to add some custom
properties to users via a script. Can anyone point me to any examples?

I have to admit i'm a little bit out of my depth - all I know at the
moment is that it is possible to add custom properties to users using
"property sheets"..
--
Rick Hurst, Freelance Web Developer, Bristol, UK
http://www.rickhurst.co.uk
Rick Hurst
2009-02-06 17:54:35 UTC
Permalink
Post by Rick Hurst
ok, now i'm up and running, my next task is to add some custom
properties to users via a script. Can anyone point me to any examples?
I have to admit i'm a little bit out of my depth - all I know at the
moment is that it is possible to add custom properties to users using
"property sheets"..
ok, maybe I thought this was more complex than it actually is - I just
suceeded in adding a property like this:-

acl_users = self.acl_users
user = acl_users.getUser(name='test_pas_user')
user.manage_addProperty('member_area', 'foo bar', type='string')

then to get the property back:-

user.getProperty('member_area')
--
Rick Hurst, Freelance Web Developer, Bristol, UK
http://www.rickhurst.co.uk
Continue reading on narkive:
Loading...