I put the following in my sub class of TurbineUser and all is well, are
there any objections to this solution?
/* Overrides TurbineUser setCreateDate(java.util.Date)*/
public void setCreateDate(java.util.Date date)
{
this.setPerm(TurbineUserPeer.CREATED, date);
}
/* Overrides TurbineUser getCreateDate */
public java.util.Date getCreateDate()
{
// if they do not have a create date, set it...
if(this.getPerm(TurbineUserPeer.CREATED) == null)
{
setCreateDate(new java.util.Date());
}
return (java.util.Date)this.getPerm(TurbineUserPeer.CREATED);
}
-----Original Message-----
From: Chris Campbell
Sent: Thursday, October 18, 2001 9:29 AM
To: [EMAIL PROTECTED]
Subject: User create date
I'm using Turbine 2.x - When I create a user, the CreateDate is not
populated in the database.
I create users like the following
try
{
User user = TurbineSecurity.getAnonymousUser();
user.setUserName(username);
user.setCreateDate(new java.util.Date());
TurbineSecurity.addUser(user, password);
}
Further when I get user with
user = TurbineSecurity.getAuthenticatedUser( username, password );
the user create date is the current time, always. TurbineUser is
constructed with createdate date set to now... Am I doing something
wrong??? Do I have to update and retrieve the dates in the turbine_user
table manually?
I have extended TurbineUser and set the new class to
services.SecurityService.user.class=com.blah.myuserclass
but have not modified the turbine_user schema...
Any insights would be much appreciated.
Chris
---------------------------------------------------------------------
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]