[opencms-dev] opencms6 - logging in a webuser

bart vandendriessche bart at nascom.be
Tue Apr 19 13:50:52 CEST 2005


these are the latest error messages in the opencms.log

org.opencms.main.CmsException: 
[org.opencms.db.mysql.CmsUserDriver]visitor [Code 10 - Unknown User]
org.opencms.main.CmsException: [org.opencms.db.mysql.CmsUserDriver]Admin 
[Code 10 - Unknown User]

Stephan Hartmann wrote:

> Do you get any error messages in opencms.log?
>
> bart vandendriessche schrieb:
>
>> Just tried changing the user_type to 2 but the same problem persists 
>> (get popup requesting for opencms authentication). Tried using 
>> cmso#loginUser(String, String) but still the same issue. Thanks for 
>> the suggestions though, I will do some more digging.
>>
>> - bart
>>
>> Stephan Hartmann wrote:
>>
>>> Then,
>>>
>>> cmso#loginUser(String, String)
>>>
>>> should work.
>>>
>>> CmsObject#loginWebUser requires that you set the USER_TYPE value of 
>>> your web users in the CMS_USERS table to 2 (There is no interface in 
>>> the administration to do this).
>>>
>>>
>>> bart vandendriessche schrieb:
>>>
>>>> Hi Stephan, thanks for the reply.
>>>>
>>>> Initially i did try to use the 
>>>> org.opencms.file.CmsObject#loginWebUser(String, String) however, as 
>>>> soon as i submit my form using the CmsObject, I get prompted for a 
>>>> username and login for access to /opencms/opencms.
>>>> Code is as follows:
>>>>
>>>>    //get the required OpenCms Object
>>>>    CmsJspActionElement cmsjsp  = new 
>>>> CmsJspActionElement(pageContext, request, response);
>>>>    CmsObject cmso              = cmsjsp.getCmsObject();
>>>>
>>>>
>>>>    //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
>>>>        cmso.loginWebUser(username, password);
>>>>    }
>>>>
>>>> This has got me well boggled :)
>>>>
>>>> Stephan Hartmann wrote:
>>>>
>>>>> 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
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>
>>
>>
>> _______________________________________________
>> 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
>
>
>
>
>
> _______________________________________________
> 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