[opencms-dev] opencms6 - logging in a webuser

Stephan Hartmann hartmann at metamesh.de
Tue Apr 19 11:03:11 CEST 2005


Hi Bart,

the CmsJspLoginBean only logs in system users. Instead, you should use

org.opencms.file.CmsObject#loginWebUser(String, String)

Regards,
Stephan

bart vandendriessche schrieb:
> Hi,
> 
> I've been having some difficulties logging in users that are members of 
> the Guests group. The requirement is to have several groups of users 
> that can log in to the online project, but not to the offline project / 
> workplace so that we can divide content according to several different 
> guest groups. I've been trying to make a small login form in which a 
> user can fill out his username / password, but I must be doing something 
> wrong since I can't seem to log in a guest. Code is as follows:
> 
>    //get the required OpenCms Object
>    CmsJspLoginBean cmsLogin    = new CmsJspLoginBean(pageContext, 
> request, response);
> 
>    //variables to catch the parameters from the request
>    String username             = "";
>    String password             = "";
>    String action               = request.getParameter("action");
> 
>    //catch the parameters if the user is trying to log in
>    if ( "login".equals(action) ) {
>        username                = request.getParameter("login");
>        action                  = request.getParameter("password");
> 
>        //log in the user
>        cmsLogin.login(username, password);
>    }
> 
> If anyone could provide some pointers that would be great,
> 
> -Bart
> 
> 
> _______________________________________________
> 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