turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Lustig" <m...@marclustig.com>
Subject AW: how to update TurbineUser instance
Date Sat, 01 Feb 2003 10:00:47 GMT
Hm, but I can't see a new instance that would be created. And there's no
error also. But still the login-name is not changed.


> -----Urspr√ľngliche Nachricht-----
> Von: Quinton McCombs [mailto:qmccombs@nequalsone.com]
> Gesendet: Samstag, 1. Februar 2003 00:23
> An: Turbine Users List
> Betreff: RE: how to update TurbineUser instance
>
>
> When you call TurbineSecurity.saveUser(u), it will check to see
> if the user already exists.  This check it performs is based on
> username.  Since the username is different, it tried to perform
> an insert.  This is the source of your problem.
>
> Please create a defect issue in Scarab for this.
>
> > -----Original Message-----
> > From: Marc Lustig [mailto:mail@marclustig.com]
> > Sent: Friday, January 31, 2003 5:08 PM
> > To: Turbine Users List
> > Subject: AW: how to update TurbineUser instance
> >
> >
> > I tried this code to change the data of a user who is not the
> > logged-in user
> >
> >       User u = TurbineSecurity.getUser(oldusername);
> >       u.setUserName(newusername);
> >       u.setPassword(newpassword);
> >       TurbineSecurity.saveUser(u);
> >
> > but the data is not saved anyway.
> > Also, what happens, when a user changes the data of another
> > user who is currently logged in. Is this possible at all with
> > the current security system?
> >
> >
> > > -----Urspr√ľngliche Nachricht-----
> > > Von: Marc Lustig [mailto:mail@marclustig.com]
> > > Gesendet: Freitag, 31. Januar 2003 23:28
> > > An: Turbine Users List
> > > Betreff: how to update TurbineUser instance
> > >
> > >
> > > I've got a form that should allow the user to change his
> > username. Now
> > > I'm running into trouble trying to update the corresponding user
> > > instance.
> > >
> > > (Note, I have extended TurbineUser:
> > > public abstract class BaseAudiotexUser extends
> > > de.geoconnect.audiotex.om.TurbineUserAdapter
> > > public class TurbineUserAdapter extends TurbineUser
> > > This implementation works pretty good so far and I don't
> > think it is
> > > related to that problem here.)
> > >
> > > This code
> > >
> > > AudiotexUser client = ..
> > > client.setUserName(x);
> > > client.save();
> > >
> > > results in that exception:
> > >
> > > Caused by: org.apache.turbine.util.security.DataBackendException:
> > > Failed to
> > > create account 'dd': Invalid argument value: Duplicate entry '1040'
> > > for key 1
> > >
> > > Apparently torque is trying to make an insert instead of an
> > update. I
> > > know this issue relates to the security-objects being
> > different from
> > > the objects that torque generates. Anybody got a fix for this?
> > >
> > > Also I read recently that TurbineUser objects are not being saved
> > > persistently, so when the user logs off the data is lost.
> > >
> > > Anybody has found work-arounds for these issues?
> > >
> > > Thanks.
> > > Marc
> > >
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > 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
> >
> >
>
> ---------------------------------------------------------------------
> 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