This is better described in the Turbine docs and mailing lists.
wrt changing the base User() schema, I believe you have two choices :
1. use dynamic fields that are stored in a blob. What they call permenant
storage, see: user.getPermStorage();
I don't particularly like that approach since you cant use SQL to query
this fields - but it seems to work.
2. Implement your own Security Manager in Turbine
This is from Dave Carlson's observations on the Jetspeed dev list:
As a way to understand the template mechanism in Jetspeed, and the database
persistence provided by Turbine, I created a simple test JSP template that
others may find helpful.
The database tables include on OBJECTDATA field, whose content was a mystery
to me. After reviewing Turbine code, I understood that any attribute/value
pairs could be assigned to a User and if the attribute did not match an
column
name in the database table schema, then it was serialized into a Hashtable
in
OBJECTDATA. But I still did not know *what* was in that blob value.
The following simple JSP page dumps all attributes of a User retrieved from
the database, regardless of whether they are from the table columns or
deserialized from the OBJECTDATA. (This is not recommended coding style for
production JSP!!! Just a quick hack that is easy to modify and test without
recompiling a servlet and restarting tomcat.)
Two attributes are extracted from the blob: _access_counter and LAST_LOGIN.
Now, LAST_LOGIN should be in a User table column, but it's not. This test
uncovered a SQL script error in all database variations included with
Jetspeed. All 6 turbine-*.sql scripts include TURBINE_USER.LASTLOGIN, where
they should have TURBINE_USER.LAST_LOGIN. I checked the turbine tdk 2.1,
and
the sql scripts contained there are correct.
If you modify this column name in the database, then subsequent accesses to
Jetspeed will correctly populate the LAST_LOGIN column, which can be viewed
via a simple DB select.
I still have not figured out why the CREATED and MODIFIED columns are not
populated in the database...
Save this JSP to: /WEB-INF/templates/jsp/screens/html/TestAccount.jsp
-------------------------
<%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld' prefix='jetspeed'
%>
<%@ page import = "org.apache.turbine.util.RunData" %>
<%@ page import = "org.apache.turbine.om.security.User" %>
<div align="left">
<h2>User persistent data</h2>
<table cellpadding="2" cellspacing="0" border="1">
<%
User user = ((RunData)request.getAttribute("rundata")).getUser();
java.util.Hashtable attrs = user.getPermStorage();
java.util.Enumeration enum = attrs.keys();
while( enum.hasMoreElements() ) {
String name = enum.nextElement().toString();
Object value = attrs.get(name);
%>
<tr>
<td><%=name%></td><td><%=value%></td>
</tr>
<%
}
%>
</table>
</div>
--------------------------------
> -----Original Message-----
> From: Oliver Boehm [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 28, 2001 10:01 AM
> To: [EMAIL PROTECTED]
> Subject: How do you expand the 'create new account'-form
>
>
>
> We would like to adapt the user registration of JetSpeed to
> our special
> needs, by adding entries like the postal address, etc., to
> the database
> in addition to just email address and username.
> We figure that we somehow have to change the
> turbine.properties, but we
> are not quite sure how to do this exactly.
>
> We use the latest CVS Jetspeed on a Mandrake-Linux 8.0 system.
>
> Could someone please point us to the right resources?
>
> Thanks,
>
> Oliver
>
>
> --
> Oliver B�hm (http://www.ice.mpg.de/departments/ChemInf)
> MPI of Chemical Ecology, Carl-Zeiss-Promenade 10, 07745 Jena, Germany
> Tel: +49(0)3641 643656
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]