[opencms-dev] opencms6 - logging in a webuser

bart vandendriessche bart at nascom.be
Tue Apr 19 16:28:07 CEST 2005


Ok, I haven't found what was causing my problem, but I just copy pasted 
the source from 
/system/modules/org.opencms.welcome/elements/login_element.jsp (which I 
based my initial code on) and that works fine when I'm not logged into 
opencms (which is the desired behaviour). Seems like its not possible to 
log in as a opencms user when you're logged in as a guest user though, 
but fortunately thats not a real issue for me.

-bart

bart vandendriessche wrote:

> 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