I also tested the effect of changing the Date parameter in 
org.apache.jetspeed.modules.actions.CreateNewUserAndConfirm�s doPerform() method. 
Default was like follows:
         Date now = new Date();
           JetspeedUser user = JetspeedSecurity.getUserInstance();
              user.setUserName( username );
              user.setCreateDate(now);
              user.setLastLogin(new Date(0));
              user.setFirstName( data.getParameters().getString("firstname") );
              user.setLastName( data.getParameters().getString("lastname") );
              user.setEmail( data.getParameters().getString("email") );

              createUser(user, data);

I changed it to: 
         Date now = new Date(0);

but now, when I added new user, the LAST_LOGIN entry in MYSQL�s user_turbine table 
changed to 00000000000000 from 19700102010000. No other changes. Why the 
user.setCreateDate(now) affected the LAST_LOGIN field? What�s the purpose of 
user.setLastLogin() then?!?

Secondly... The "new user" html-form in the portal seems to call for this class as 
it�s action, but the createUser() method is empty. Where the creation is actually 
handled? I�m lost. 

Thanks for all comments.
Risto K�rkk�inen


-----Urspr�ngliche Nachricht-----
Von: Kaerkkaeinen, Risto Juhani 
Gesendet: Monday, July 28, 2003 4:01 PM
An: [EMAIL PROTECTED]
Betreff: New User Account: Timestamps are not entered properly to MySQL
tu rbine_user table



Hi!

While trying to add new user via Jetspeed based portal, the new record is added to 
MYSQL�s turbine_user table so that the MODIFIED timestamp is just fine as the current 
time, but CREATED and PASSWORD_CHANGED are a set of zeros and LAST_LOGIN is set to 
default (the year 1970 etc.). LAST_LOGIN and PASSWORD_CHANGED become correct after the 
related actions, but CREATED is stuck to zeros. Otherwise the portal seems to be 
working.

I�m using jetspeed-1.4-b4 and mysql-3.23.57-win. The driver is 
mysql-connector-java-3.1.0-alpha. The DB has been build with the provited sql scripts 
and the security-schema.xml shows all the earlier fields as similar kind TIMESTAMP.

    <column name="MODIFIED" type="TIMESTAMP"/>
    <column name="CREATED" type="TIMESTAMP"/>
    <column name="LAST_LOGIN" type="TIMESTAMP"/>
    <column name="DISABLED" size="1" type="CHAR"/>
    <column name="OBJECTDATA" type="BINARY"/>
    <column name="PASSWORD_CHANGED" type="TIMESTAMP"/>   

Earlier version of the project was using hypersonic DB and then the MODIFIED and 
CREATED seemed to be set permanently to NULL. The LAST_LOGIN was working as in the 
current version with MySQL. The PW_CHANGED field didn�t exist in that version of 
Jetspeed.

The nightly build from 17.7.2003 didn�t help and neither did testing this with only 
the "default" Jetspeed portal and MySQL. Same problems accure. I was also unable to 
find any similar problems on the mailing lists or FAQs. Only somehow related comment I 
found, was at the Apache Bug Database by Mark Orciuch. He wrote: "[FIX] Last login 
timestamp is not recorded - When the user is originally created last login is 
initialized but never changes thereafter. I confirmed this problem all the way back to 
1.4b1."

Any idea what is causing these timestamp variations? Why I�m getting only one field 
working and the others not? It would be nice to get the timestamps working properly. 
All help greatly appreciated!

Thanks,
Risto K�rkk�inen 

---------------------------------------------------------------------
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]

Reply via email to