turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Campbell" <campb...@kontiki.com>
Subject RE: User create date
Date Thu, 18 Oct 2001 17:55:51 GMT
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: turbine-user@jakarta.apache.org
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: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Mime
View raw message