I remember having a problem similar to this a while back. I think
updateLastLogin() was writing directly to the database, but TurbineUser
(or whatever the default name was back then) was not populating its
hashtable entry, so it was being set to the value that was in the db
prior to the call to updateLastLogin. So when save() was called the old
value was written back to the db. Can you tell if this is what is still
happening? I may have neglected to fix the default user.
John McNally
Will Stranathan wrote:
>
> Am I just going about this the wrong way? I'm trying to create a
> class to login a user, and everything SEEMS to be working okay,
> except when I call updateLastLogin(), the database doesn't get
> updated with the new login information. Here's what I have:
>
> try {
> user =
> TurbineSecurity.getAuthenticatedUser(data.parameters.getString("userid"),
> data.parameters.getString("password"));
> data.setUser(user);
> user.setHasLoggedIn(new Boolean(true));
> user.updateLastLogin();
> data.setMessage(user.getLastLogin().toString());
> data.save();
> } catch (Exception e) {
> data.setMessage(e.getMessage());
> setTemplate(data, "Login.vm");
> }
> }
>
> getLastLogin contains the current date and time, but even data.save()
> isn't updating the database's LASTLOGIN value. The thing is, I can't
> seem to figure out which concrete class for User is being created -
> User is an interface, and I can't really determine which concrete
> User class is getting returned by
> TurbineSecurity.getAuthenticatedUser().
>
> Any help?
>
> My TurbineResources.properties file says I'm using the
> DBSecurityService.
>
> Thanks,
> Will Stranathan
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Calendar - Get organized for the holidays!
> http://calendar.yahoo.com/
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?: [EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]