You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Foth, Oliver" <Ol...@gedas.de> on 2001/10/23 11:48:46 UTC
change password permanently
> Hi everybody,
>
> I have a problem with changing a user's password in a template. When I
> change the password it is stored to the (oracle) database correctly and
> everything looks good. But as soon as I log out, the password is set back
> to its old value. This happens with the FluxUserAction as well as with my
> own action. When I execute the same sql-statement directly in an
> sql-worksheet, the password is changed permanently and not only as long as
> the user is logged in. Why does that happen? Could it be a problem that I
> only want the user to change the password, but not the user-name etc. and
> therefore left out all the other values?
>
>
> Rgds,
>
> Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: change password permanently
Posted by Andrea Papotti <bi...@ettelematica.it>.
try with:
Criteria criteria = new Criteria();
criteria.add( TurbineUserPeer.USER_ID, uid );
Vector rset = TurbineUserPeer.doSelect(criteria);
if (rset.size()!=0 )
{
usr = (TurbineUser)rset.elementAt(0);
usr.setPassword( password );
usr.setModified( true );
usr.setNew( false );
usr.save();
}
this on my apps does works.
IMHO the strange behavior could be cause by the .save() operation of flux on
user logout.
hope it's useful, Andrea
---- --- -- - - -- --- ----
Drive A: not responding.. .Formating C: instead
----- Original Message -----
From: "Foth, Oliver" <Ol...@gedas.de>
To: <tu...@jakarta.apache.org>
Sent: Tuesday, October 23, 2001 11:48 AM
Subject: change password permanently
> > Hi everybody,
> >
> > I have a problem with changing a user's password in a template. When I
> > change the password it is stored to the (oracle) database correctly and
> > everything looks good. But as soon as I log out, the password is set
back
> > to its old value. This happens with the FluxUserAction as well as with
my
> > own action. When I execute the same sql-statement directly in an
> > sql-worksheet, the password is changed permanently and not only as long
as
> > the user is logged in. Why does that happen? Could it be a problem that
I
> > only want the user to change the password, but not the user-name etc.
and
> > therefore left out all the other values?
> >
> >
> > Rgds,
> >
> > Oliver
>
> ---------------------------------------------------------------------
> 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