I don't test it but what do you think about something like this?
in tools.py in the class Auth:
in __init__:
auth.settings.create_user_groups=True
in function register:
...
if form.accepts(request.vars, session, formname='register',
onvalidation=onvalidation):
description = \
'group uniquely assigned to %(first_name)s %(last_name)
s'\
% form.vars
group_id = self.add_group("user_%s" % form.vars.id,
description)
self.add_membership(group_id, form.vars.id)
...
could be transform in:
...
if form.accepts(request.vars, session, formname='register',
onvalidation=onvalidation):
try:
if self.create_user_groups ==False:
pass
else:
raise
except:
description = \
'group uniquely assigned to %(first_name)s
%last_name)s'\
% form.vars
group_id = self.add_group("user_%s" % form.vars.id,
description)
self.add_membership(group_id, form.vars.id)
....
Jean-Marc
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---