[opencms-dev] Users info

Moro Álvarez, Manuel MMORO at sadiel.es
Tue Feb 22 09:37:26 CET 2005


Ok, this´s I need.
Thanks

-----Mensaje original-----
De: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] En nombre de Robert Petermeier
Enviado el: lunes, 21 de febrero de 2005 20:57
Para: The OpenCms mailing list
Asunto: Re: [opencms-dev] Users info


Moro Álvarez schrieb:
> Hello, I want to know the name of the user that locked a resources, 
> and I´ve this:
>  
> int userId = res.isLockedBy();
> String username=??
>  
> How I get the username, by userid?

Let's see, you have a CmsResource res and a CmsObject cmso so this line 
should do it:

String userName =
     cmso.readUser(cmso.getLock(res).getUserId()).getName();

See <http://www.codedroids.com/javadocs/opencms/build_5_5_4/docs/api/index.html>


Bye,
Robert


_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit http://mail.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list