You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by David Demner <tu...@demner.com> on 2004/01/24 22:10:08 UTC

Renaming a user

I have a minor issue with Turbine security.  I can't rename a user; when I
go:
 
                 User user = TurbineSecurity.getUser(oldLoginName);
                 user.setName(newLoginName);
                 TurbineSecurity.saveUser(user);
 
I get an org.apache.turbine.util.security.UnknownEntityException: Unknown
user 'newLoginName'
 
Is there any workaround (other than creating a new user object, copying all
the properties/groups/roles individually, saving this user, and deleting the
old user)?
 
Thanks,
 
David Demner

RE: Renaming a user

Posted by Eric Pugh <ep...@upstate.com>.
Gerry Duprey is working on a step by step howto for Turbine 2.3 and Fulcrum
Security, see his thread "Turbine, Fulcrum & Security".

If you email him directly he may have something he can share..

ERic

> -----Original Message-----
> From: David Demner [mailto:turbine@demner.com]
> Sent: Sunday, January 25, 2004 4:46 PM
> To: 'Turbine Users List'
> Subject: RE: Renaming a user
>
>
> Is there a howto on migrating to fulcrum?
>
> Thanks.
>
> -----Original Message-----
> From: Eric Pugh [mailto:epugh@upstate.com]
> Sent: Sunday, January 25, 2004 2:43 AM
> To: 'Turbine Users List'
> Subject: RE: Renaming a user
>
>
> Check out the fulcrum security stuff..   Some peple have
> recently started
> using it with Turbine 2.3..  I think it is much better....
>
>
> ---------------------------------------------------------------------
> 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


RE: Renaming a user

Posted by David Demner <tu...@demner.com>.
Is there a howto on migrating to fulcrum?

Thanks.

-----Original Message-----
From: Eric Pugh [mailto:epugh@upstate.com] 
Sent: Sunday, January 25, 2004 2:43 AM
To: 'Turbine Users List'
Subject: RE: Renaming a user


Check out the fulcrum security stuff..   Some peple have recently started
using it with Turbine 2.3..  I think it is much better....


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: Renaming a user

Posted by Eric Pugh <ep...@upstate.com>.
Check out the fulcrum security stuff..   Some peple have recently started
using it with Turbine 2.3..  I think it is much better....

> -----Original Message-----
> From: Gedin Frederic [mailto:frederic.gedin@jaluna.com]
> Sent: Sunday, January 25, 2004 8:06 AM
> To: Turbine Users List
> Subject: Re: Renaming a user
>
>
> David Demner wrote:
>
> >I have a minor issue with Turbine security.  I can't rename
> a user; when I
> >go:
> >
> >                 User user = TurbineSecurity.getUser(oldLoginName);
> >                 user.setName(newLoginName);
> >                 TurbineSecurity.saveUser(user);
> >
> >I get an
> org.apache.turbine.util.security.UnknownEntityException: Unknown
> >user 'newLoginName'
> >
> >Is there any workaround (other than creating a new user
> object, copying all
> >the properties/groups/roles individually, saving this user,
> and deleting the
> >old user)?
> >
> >Thanks,
> >
> >David Demner
> >
> >
> >
> One way to do it is to define your own class of TurbineUser
> which will
> allow you to make all the changes you want in the database records.
> However, be careful in your code when you rename an user
> which is loged in.
> Not a very academic solution but it may help you
>
> Regards
>
>
> ---------------------------------------------------------------------
> 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


Re: Renaming a user

Posted by Gedin Frederic <fr...@jaluna.com>.
David Demner wrote:

>I have a minor issue with Turbine security.  I can't rename a user; when I
>go:
> 
>                 User user = TurbineSecurity.getUser(oldLoginName);
>                 user.setName(newLoginName);
>                 TurbineSecurity.saveUser(user);
> 
>I get an org.apache.turbine.util.security.UnknownEntityException: Unknown
>user 'newLoginName'
> 
>Is there any workaround (other than creating a new user object, copying all
>the properties/groups/roles individually, saving this user, and deleting the
>old user)?
> 
>Thanks,
> 
>David Demner
>
>  
>
One way to do it is to define your own class of TurbineUser which will 
allow you to make all the changes you want in the database records. 
However, be careful in your code when you rename an user which is loged in.
Not a very academic solution but it may help you

Regards


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org