[opencms-dev] login with current user

manolo fdez manolofdez85 at hotmail.com
Mon Jul 3 17:35:55 CEST 2006


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.
-- 
View this message in context: http://www.nabble.com/login-with-current-user-tf1885252.html#a5153825
Sent from the OpenCMS - Dev forum at Nabble.com.




More information about the opencms-dev mailing list