Hi Eric,

Yes, I thought that too. In my LoginUser class I do:

...
        try {
            // Authenticate the user and get the object.
            user = TurbineSecurity.getAuthenticatedUser(username, password);

            // Store the user object.
            data.setUser(user);

            // Mark the user as being logged in.
            user.setHasLoggedIn(new Boolean(true));

            // Set the last_login date in the database.
            user.updateLastLogin();

            // This only happens if the user is valid; otherwise, we
            // will get a valueBound in the User object when we don't
            // want to because the username is not set yet.  Save the
            // User object into the session.
            data.save();

....

the updateLastLogin() does this

    public void updateLastLogin()
            throws Exception
    {
        setPerm(User.LAST_LOGIN, new java.util.Date());
    }

Then as pointed out below the DbUserManager.saveOnSessionUnbind(User user)
removes everything from the permStorage, including the LAST_LOGIN I
carefully set? The logic does not make sense. Of course there is something I
don't know yet, hoping a Turbine developer might know ;)

If I have to switch to Fulcrum because Turbine Security is no longer
supported then how much effort is involved? I note from the Fulcrum site
that it warns that the Turbine version compiles but is not tested at all. So
it looks like to have a security systems that persists to disk I would need
to introduce Hibernate using Simple? Which looks like work in progress?
Since my deadline is mid week I think I'd better get the original one
working.

thanks

David



> -----Original Message-----
> From: Eric Pugh [mailto:[EMAIL PROTECTED]
> Sent: 25 October 2003 23:02
> To: 'Turbine Users List'
> Subject: RE: Turbine Security error, LAST_LOGIN is NULL
>
>
> I was under the impression that it was dealt with when a user
> logs in?  And
> just updates that..   Are you wedded to the Turbine security
> implementation?
> Have you looked at the fulcrum security version?  I think that it is a bit
> easier to understand...
>
> Eric
>
> > -----Original Message-----
> > From: David Wynter [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, October 25, 2003 9:54 PM
> > To: Turbine-User
> > Subject: Turbine Security error, LAST_LOGIN is NULL
> >
> >
> > Hi,
> >
> > I tried to work out how the Turbine Security using the db
> > option works so I
> > could solve the update failure due to LAST_LOGIN being  NULL
> > problem. See my
> > previous post a few days ago for a stack trace.
> >
> > Looking at this bit of code (lines 365 - 376 for
> > DbUserManager) it removes
> > all the values from permStorage and puts it in the Criteria
> > for updating.
> >
> >         for (int i = 1; i < TurbineUserPeer.columnNames.length; i++)
> >         {
> >             if
> > (permStorage.containsKey(TurbineUserPeer.columnNames[i]))
> >             {
> >                 permStorage.remove(TurbineUserPeer.columnNames[i]);
> >             }
> >         }
> >         crit.add(TurbineUserPeer.OBJECT_DATA, permStorage);
> >
> >         try
> >         {
> >             TurbineUserPeer.doUpdate(crit);
> >
> > I cannot see where the LAST_LOGIN value should be set, do any
> > of the Turbine
> > developers know about this? I have never had to do set a value for
> > LAST_LOGIN in my code before. I am wondering if it is that I
> > have changed to
> > SQL Server from Oracle that is causing this? Any other SQL
> > Server users
> > having this problem? It seems unlikely to be the database.
> >
> > thanks
> >
> > David Wynter
> >
> >
> > ---------------------------------------------------------------------
> > 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]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to