You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Nathan Barron <na...@Rightmove.co.uk> on 2002/08/02 15:23:53 UTC

Turbine Security problem

Guys
 
I am having problems with the
org.apache.turbine.services.security.TurbineSecurity class. If I use the
method saveUser(User user) within the class it doesn't save any 'Date' type
objects into the database that I have set within the particular 'User'
object I have given the method, in particular the lastlogin 'Date' field.
However the method does save any strings that I set within the 'User' object
into the database.
 
Has anyone got a fix as I know that it has got to be a bug in the turbine
architecture framework.
 
Cheers
 
Nathan 
 
Nathan Barron
Java Developer
rightmove.co.uk
Room 8, Glen House,
Stag Place, London, SW1E 5AG
n Email: nathan.barron@rightmove.co.uk
<ma...@rightmove.co.uk> 
n Tel: 020 7821 9673
n Mob: 07779 020 559
n Fax: 020 7821 9684
The information in this email and any documents and files transmitted with
it are confidential and for the use of the intended recipient only. If you
are not the intended recipient, please delete the message and statements
immediately and notify the sender. Any unauthorised dissemination or copying
of this email, or any misuse or wrongful disclosure of the information
contained in it, is strictly prohibited and may be illegal. The opinions,
statements and thoughts expressed in this email and its attachments if any
are those of the individual sender and not necessarily rightmove.co.uk or
any associated personnel. Although rightmove.co.uk believes this email and
any attachments are free of any virus or other defect which may affect a
computer, it is the responsibility of the recipient to ensure that it is
virus free and rightmove.co.uk does not accept any responsibility for any
loss or damage arising in any way from its use.

 
 


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs service. 
________________________________________________________________________

Re: Turbine Security problem

Posted by Rodney Schneider <rl...@arcalink.com>.
On Fri, 2 Aug 2002 23:23, you wrote:

> Guys
>
> I am having problems with the
> org.apache.turbine.services.security.TurbineSecurity class. If I use the
> method saveUser(User user) within the class it doesn't save any 'Date' type
> objects into the database that I have set within the particular 'User'
> object I have given the method, in particular the lastlogin 'Date' field.
> However the method does save any strings that I set within the 'User'
> object into the database.
>
> Has anyone got a fix as I know that it has got to be a bug in the turbine
> architecture framework.
>
> Cheers
>
> Nathan

Hi Nathan!

We had some issues with the CREATED date field in the Turbine User object.  
Whenever we called User.getCreated(), the call would return the time the 
object was instantiated rather than the time the User was created in the 
database.  To solve this problem, we wrote our own User subclass with the 
following method overrides...

------------
public Date getCreated() {
  return (Date) getPerm("CREATED");
}

public void setCreated(Date d) {
  setPerm("CREATED", d);
}
------------

...  which ensured that the CREATED date was stored and retrieved from the 
database.

As far as the LAST_LOGIN field is concerned, ours is set in our Login action, 
which is updated every time a user logs in to the system.  This is done with 
the following call...

------------
user.updateLastLogin();
------------

The only other date data is the MODIFIED field.  We use MySQL as our 
database, and because this is the first timestamp field in our TURBINE_USER 
table, it is updated automatically by MySQL whenever a TURBINE_USER row is 
updated.

Hope that helps,

-- Rodney

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>