Elliot,

Thanks for the help.

However, I seem to be missing something.  When in 
PasswordAuthentication.initEPerson, a run into two issues.  First, a row has 
not yet been created in the eperson table to store the additional information.  
Second, the context object does not appear to be able to establish a 
dbconnection.

As a simple test, I tried something like:

public void initEPerson(Context context, HttpServletRequest request, EPerson 
eperson)
        throws SQLException
    {
        String query = "SELECT * FROM eperson";
        TableRow tr = DatabaseManager.querySingle(context, query);
        tr.setColumn("phone","testing");
        DatabaseManager.update(context, tr);
    }

I was expecting this to set the phone of the first user to testing.  However, 
dspace crashed returned an internal system error with a NullPointerException 
that appears to come from the lack of a table name in the 
DatabaseManager.update, which requires a context.dbconnection call.

Can you or anyone else see the errors of my way?

Thanks,
Andy

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:dspace-tech-
> [EMAIL PROTECTED] On Behalf Of Elliot Metsger
> Sent: Sunday, May 25, 2008 1:26 PM
> To: [email protected]
> Subject: Re: [Dspace-tech] Adding Fields to Create Profile
>
>
> Andrew,
>
> One way to do this is to extend the PasswordAuthentication class, and
> override the initEPerson( Context, HttpServletRequest, EPerson )
> method.
> Inside that method you can collect your additional information and
> store it
> where you want.
>
> We collect extra information and store it in the DSpace database - we
> added
> varchar columns to the eperson table to store the information, and then
> access the information later by using the EPerson.getMetadata( String )
> method, where the string value corresponds to the name of the extra
> column:
>
> dspace=> \d eperson;
>                     Table "public.eperson"
>        Column        |            Type             | Modifiers
> ---------------------+-----------------------------+-----------
>  eperson_id          | integer                     | not null
>  email               | character varying(64)       |
>  password            | character varying(64)       |
>  ...
>  jhu_jhedid          | character varying(8)        |
>  jhu_affil           | character varying(255)      |
>  jhu_primcampus      | character varying(255)      |
>  jhu_deptno          | character varying(255)      |
>  jhu_hopkinsid       | character varying(8)        |
>  jhu_ssologin        | character varying(5)        |
> ...
>
> someEperson.getMetadata( "jhu_deptno" ) would return the user's
> department
> number.
>
> Hope this helps,
> Elliot
>
>
> Smith, Andrew J wrote:
> >
> > Hello,
> >
> > We need to collect additional information when a user creates a new
> > account, other than name and phone number.  I've looked through the
> > how-to's and forums, but have come up empty on how to accomplish
> this.
> > Could someone outline the steps or point me to information that I
> might
> > have missed?   This application is using Dspace 1.4.2/Manakin 1.1.
> >
> > Thanks.
> >
> > ---------------------------------------------------------------------
> ----
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > DSpace-tech mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/dspace-tech
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Adding-Fields-to-
> Create-Profile-tp17433032p17460179.html
> Sent from the DSpace - Tech mailing list archive at Nabble.com.
>
>
> -----------------------------------------------------------------------
> --
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to