[Zope] Create an account with cookiecrumbler

Gilles Lenfant gilles@pilotsystems.net
Tue, 11 Sep 2001 20:22:37 +0200


Hi,

A form requires authentication data for subscription.

I handle this data with a python script and create a new user in acl_user
with 'member' role. Till there all's OK.

Then I add some instructions in this script to log this new user with
CookieCrumbler, as indicated in the default provided "login_form"

...
context.acl_users.manage_users(submit='Add', REQUEST=context.REQUEST)

context.REQUEST.form['__ac_name'] = form['newusername']
context.REQUEST.form['__ac_password'] = form['newpassword']
context.REQUEST.form['__ac_persistent'] = '1'
context.REQUEST.form['came_from'] = 'minimum_html'
return context.logged_in(context, REQUEST=context.REQUEST)

What's strange :

1/ This does not work

2/ The new user is not created when adding the lines that _try to_ log using
CookieCrumbler

Any idea ?

Thanks in advance

--Gilles