[Zope] MySQL User Folder - adding additional user datafields.

David Washburn dwashburn@aminfo.com
Tue, 10 Jun 2003 11:37:34 -0400


This is a multi-part message in MIME format.

--Boundary_(ID_RecngtgIOkz57PWPVUNeNA)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT

I am planning on using MySQL User Folder with a Plone member's only site. I
have it working in ZOPE for user signin and that works.

I want to add a number data fields for each user, typical fields like
ADDRESS, PHONE, POSTAL CODE, TITLE...
I need to be able to update and report the data from outside ZOPE, that's
why I choose MySQL.

While the documentation for MySQL User Folder goes into more depth than most
ZOPE products, it is unclear how to best accomplish this task.

I want to be able to load the basic user info (title, email, first name,
last name) into the REQUEST object at login so I can display and use it
throughout the site.

There seem to be two methods (NOTE: This is a small site so volume of data
is not an issue).

1) enhance the "User" table by adding needed data fields;
2) use the "MiscData" table to hold the data fields.

I need the end-users to be able to update some of these fields, such as
TELEPHONE.

My questions:
1) Which is better storage approach - (1 or 2 from above)?

2) Where can I insert code to load the additional user data into the REQUEST
object? It is unclear to me what modules are called when or after the user
authenticates by either direct login/http or cookie login.

3) How does ZOPE know to map a user onto a user's folder.

4) I assume I can use any approach for SQL databases to allow the user to
update selected user data fields (TELEPHONE, TITLE...).

I am looking for a concrete example (ideally with some code to model my work
after) or a HowTo to make this happen.

Also -- is there some documentation on the USER object in ZOPE (and Plone).
It looks like MySqUserFolder loads data into a USER object, but I am unclear
how to use that to hold and get the information I am looking for.

(I would be open to alternative approaches if the satisfied my requirements)

Thanks,
David
=======================================
David T. Washburn DWashburn@AmInfo.com
Amherst, MA USA
413 256-3103


--Boundary_(ID_RecngtgIOkz57PWPVUNeNA)
Content-type: text/html; charset=iso-8859-1
Content-transfer-encoding: 7BIT

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>I am planning on 
using MySQL User Folder with a Plone member's only site. I have it working in 
ZOPE for user signin and that works.</FONT></SPAN></DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>I want to add a 
number data fields for each user, typical fields like ADDRESS, PHONE, POSTAL 
CODE, TITLE...</FONT></SPAN></DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>I need to be able to 
update and&nbsp;report&nbsp;the data from outside ZOPE, that's why I choose 
MySQL.</FONT></SPAN></DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>While the 
documentation for MySQL User Folder goes into more depth than most ZOPE 
products, it is unclear how to best accomplish this task.</FONT></SPAN></DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>I want to be able to 
load the basic user info (title, email, first name, last name) into the REQUEST 
object at login so I can display and use it throughout the 
site.</FONT></SPAN></DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>There seem to be two 
methods (NOTE: This is a small site so volume of data is not an 
issue).</FONT></SPAN></DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>1) enhance the 
"User" table by adding needed data fields;</FONT></SPAN></DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>2) use the 
"MiscData" table to hold the data fields.</FONT></SPAN></DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>I need the end-users 
to be able to update some of these fields, such as 
TELEPHONE.</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>My 
questions:</FONT></SPAN></DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>1) Which is better 
storage approach - (1 or 2 from above)?</FONT></SPAN></DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>2) Where can I 
insert code to load the additional user data into the REQUEST object? It is 
unclear to me what modules are called&nbsp;when or after the user authenticates 
by either direct login/http or cookie login.</FONT></SPAN></DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>3) How does ZOPE 
know to map a user onto a user's folder.</FONT></SPAN></DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>4) I assume I can 
use any approach for&nbsp;SQL databases&nbsp;to allow the user to 
update&nbsp;selected user data fields (TELEPHONE, TITLE...).</FONT></SPAN></DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>I am looking for a 
concrete example (ideally with some&nbsp;code to model my work after)&nbsp;or 
a&nbsp;HowTo to make this happen.</FONT></SPAN></DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>Also -- is there 
some documentation on the USER object in ZOPE (and Plone). It looks like 
MySqUserFolder loads data into a&nbsp;USER object, but I am unclear how to use 
that to hold and get the information I am looking for.</FONT></SPAN></DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=209505914-10062003><FONT face=Arial size=2>(I would be open to 
alternative approaches if the satisfied my requirements)</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=209505914-10062003>Thanks,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=209505914-10062003>David</SPAN></FONT></DIV>
<DIV><FONT face=Arial 
size=2>=======================================</FONT></DIV>
<DIV><FONT face=Arial size=2>David T. Washburn </FONT><FONT face=Arial size=2><A 
href="mailto:DWashburn@AmInfo.com">DWashburn@AmInfo.com</A></FONT></DIV><FONT 
face=Arial size=2>
<DIV><FONT face=Arial size=2>Amherst, MA USA</FONT></DIV>
<DIV>413 256-3103</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

--Boundary_(ID_RecngtgIOkz57PWPVUNeNA)--