[opencms-dev] Creating a new user using JSP - urgent

Trevor Lee Trevor.Lee at 4Loop.com.au
Tue Nov 18 07:05:02 CET 2003


Hi,

I've written a jsp file that creates a new user. This works fine. But when i
log on as the user using the opencms login screen, I don't seem to have the
permissions to create jsp files etc. If i create a user using the opencms
dialogs, I don't seem to have this problem.

Similarly, I posted a message yesterday about logging in using a jsp file
http://mail.opencms.org/pipermail/opencms-dev/2003q4/008138.html
where i am also experiencing the problem where i am unable to view jsp files
when logging in via the jsp file as opposed to having no such problem when i
log on using the same user via opencms..

The other question i have is where can i find the structure of the
"additionalinfo" hashtable? what are the fields?

How can i set the user preferences on login? eg display explorer offline
view. etc?

If any one can help with the above that would be good as i need to get
something going real soon.
Thank you.

Cheers
Trevor

PS Here's the code segment to create the new user:

<%
    try
    {
    String sUsername = "user1";
    String sPassword = "user1"; // must be > 4 chars
    String slogin = cmso.loginUser("admin", "admin");
    out.println("logged in as: " + cms.user("name") + "<br/>");

    CmsUser user = cmso.addUser(sUsername, sPassword, "Projectmanager",
"Project Manager", new Hashtable(), cmso.C_FLAG_ENABLED);
    }
    catch (CmsException ce)
    {
        ce.printStackTrace(System.out);
    }
%>




More information about the opencms-dev mailing list