Forum OpenACS Q&A: User Details

Collapse
Posted by Tak Wing Chiu on
I'm using openacs-4.6.3. What should I do if I wana store more user informatoin (eg. chinese name, occupation)?
Thanks
Collapse
2: Re: User Details (response to 1)
Posted by Tak Wing Chiu on
Should I alter table users or persons, or add a new table?
Collapse
3: Re: User Details (response to 2)
Posted by Brian Fenton on
I've recently started this type of change and I created a new table called persons_extra to store extra information related to persons. It has a primary key of person_id.
Collapse
4: Re: User Details (response to 1)
Posted by Jade Rubick on
This is a very common question, and it should be in the FAQ. I'm not really sure what the best solution is. Creating a separate table might be the best, but I haven't done this yet, so I'm curious what others have done in this situation. If enough people respond to this thread, I'll put it in the FAQ.
Collapse
5: Re: User Details (response to 4)
Posted by Tilmann Singer on
It's a frequently asked, but unfortunately not a frequently answered question. In regards to contact management a lot of cool stuff could be accomplished with openacs if only the right bits were added. E.g. a way to add user attributes via a webinterface and manage them ...

For now a separate table that references persons is definitely much better than extending the core tables.

Collapse
6: Re: User Details (response to 1)
Posted by Don Baccus on
Well, photobook (in contrib) uses CR attributes to extend users and it can be customized via the Tcl script that defines the CR type it uses.  Since it uses the CMS auto-form generation stuff you don't need to change the code itself.

Missing, though, is the web interface to add or delete new attributes.  The CMS has code to do this for CR types that could be woven into photobook then you'd have what you want, I think, Til ... get to it, dude! :)

Collapse
7: Re: User Details (response to 6)
Posted by Jade Rubick on
Don, I thought those procs could only be used to extend content repository based tables. I don't really see how it would work, then, with the users table.

I guess maybe you're talking about photobook, which I'm guessing doesn't extend users, but a table that's related to users?

Collapse
8: Re: User Details (response to 1)
Posted by Jon Griffin on
Look at http://jongriffin.com/static/openacs/acs-person/ There was also some changes to the core that should be implemented but we were waiting for PG to catch up with things. Search the forum. Also note that acs-person was deprecated, I updated my instances but never submitted patches as PG until 7.3 didn't support dropping columns and keeping RI intact.

Hope this makes sense, if not blame the home brew!

Collapse
9: Re: User Details (response to 1)
Posted by Jon Griffin on
Don, RE: attributes. Brad Duell, CR Oldham,Roc & Vivian Hernandez and myself have made an interface for this.

Vivian did most of the grunt work, and probably has the code but there is a lot of hardcoded instances for the client in it.

I really don't have time to clean it up, and of course CR would have the ultimate say as to whether it is released or not, but I talked with him before and he said fine. It really is a complete package and of course if someone would voluneteer to clean it up that would probably be fine also. BTW, only Oracle now, but should be easy to port to PG as I don't remember any strange SQL.

Collapse
10: Re: User Details (response to 1)
Posted by Don Baccus on
Are these object attributes, then?  Unfortunately the Content Repository (not to be confused with CR-the-person) has its own attribute system.  Anyway some day it would be nice to be able to deal with both in a unified way but that's a long, long ways down the road.  It would be good to get your code cleaned up and reviewed and PG-ized and folded in if everyone likes it.

Anyway ... Jade, yes, the cr_item used by photobook is related to the user object, as you say cr objects can't be subtyped from arbitrary object types.  But this way you do get an edit audit/history as well as the use of autogenrated forms.

Collapse
11: Re: User Details (response to 1)
Posted by Jon Griffin on
Yes these are object attributes, but still very useful as most people aren't knee deep in CR yet.
Hopefully Roc or Vivian will respond to this.
Collapse
12: Re: User Details (response to 1)
Posted by C. R. Oldham on
Greetings,

Sorry, they are not Content Repository attributes.  They are just general object attributes.  It's not a very full-featured package.  If anyone wants it I'll tar it up and post it.

Collapse
13: Re: User Details (response to 1)
Posted by Jon Griffin on
CR, I think I have a partially ported version. I will clean it up and put it in contrib or somewhere.
Just wanted to have your permission first.
Collapse
14: Re: User Details (response to 13)
Posted by Randy O'Meara on
Jon,

Did you put this package in contrib?

Thanks,

Randy