[opencms-dev] login with current user
Aitor de la Puente
aitor at dicampus.com
Mon Jul 3 21:05:49 CEST 2006
Why don't you store the user's password in session?
El lun, 03-07-2006 a las 08:35 -0700, manolo fdez escribió:
> When I make some operations with files on the VFS, I need to do it with the
> user who is currently logged in.
> But I don't want to ask the user for retyping his password everytime I need
> it.
>
> I made an aproach, but It doesn't work because the method getPassword()
> returns the crypted password, not the original.
> Do you know if it is possible to login with the current user?
>
>
>
>
> CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
> response);
>
> CmsObject ocms = OpenCms.initCmsObject("Guest");
> CmsUser cuser = ocms.readUser( cms.user("name") );
>
>
> ocms.loginUser( cuser.getName(), cuser.getPassword() );
>
>
>
> Thanks.
--
Saludos
--
-- Aitor de la Puente
--
More information about the opencms-dev
mailing list