You are not logged in Log in Join
You are here: Home » Members » Hugo Ramos » HowTo's » Manage users using a form

Log in
Name

Password

 

Manage users using a form

 

Created by hramos . Last modified 2004-02-23 12:44:35.

How to manage users using an HTML form
Adding a user: <dtml-with "folder1.folder2"> <dtml-call "REQUEST.set('name', userlogin)"> <dtml-call "REQUEST.set('password', userpass)"> <dtml-call "REQUEST.set('confirm', passconfirmation)"> <dtml-call "REQUEST.set('roles', ['desired_role'])"> <dtml-call "acl_users.manage_users('Add',REQUEST,RESPONSE)"> </dtml-with>

Changing user values: <dtml-with "folder1.folder2"> <dtml-call "REQUEST.set('name', userlogin)"> <dtml-call "REQUEST.set('password', userpass)"> <dtml-call "REQUEST.set('confirm', passconfirmation)"> <dtml-call "REQUEST.set('roles', acl_users.getUser(userlogin).getRoles())"> <dtml-call "acl_users.manage_users(submit='Change', REQUEST)"> </dtml-with>

Deleting users: <dtml-with "folder1.folder2"> <dtml-call "REQUEST.set('names', [userlogin])"> <dtml-call "acl_users.manage_users('Delete', REQUEST)"> </dtml-with> "userlogin", "userpass", "passconfirmation" and "desired_role" are form variables.