auth.resiter() form is not thought for person A to register person B
but for person A to register itself.

You can use appadmin to register another person or you have to create
your own interface for example via

   form=crud.create(db.auth_user)

You can also make your form more complex

   form=SQLFORM.factory(db.auth_user,Field('group1'),Field('group2')):
   if form.accepts(request.vars):
         insert form.vars into db.auth_user
         if form.vars.group1. auth.add_membership(....)
         if form.vars.group2. auth.add_membership(....)


On Apr 21, 10:00 pm, rohfle <[email protected]> wrote:
> When I said "logging on", I meant the process of login, not logging
> events.
>
> Elaborating on the original questions:
> 1) For example, I login as an administrator and I register a user name
> named bob. When I click submit to register bob, the currently logged-
> in user gets switched from administrator to "bob" after being added to
> the database. Can I stop this switch from occurring?
>
> 2) I want to extend the register form from looking in HTML like:
>         [username]
>         [firstname]
>         [lastname]
>         [password]
>         [verify password]
>                       <Submit>
> to:
>         [username]
>         [firstname]
>         [lastname]
>         [password]
>         [verify password]
>
>        [x] group1
>        [  ] group2
>                       <Submit>
> where group1 and group2 come from the table auth_group.
>
> Sorry I should have made these things clearer.
>
> On Apr 22, 2:13 pm, mdipierro <[email protected]> wrote:
>
> > 1) Yes. Look at the bottom of this page:
>
> >http://www.web2py.com/book/default/section/8/2
>
> > If you set a log message to None, the log is not performed.
>
> > 2) Not sure I understand. You can do
>
> > auth.settings.register_onaccept=lambda form: do_something_with(form)
>
> > On Apr 21, 8:14 pm, rohfle <[email protected]> wrote:
>
> > > Couple of questions about web2py Auth:
>
> > > 1) Can I stop Auth.register from logging on as the newly created user
> > > after registration?
> > > 2) Is there a way to add group membership to form returned by
> > > Auth.register?
>
> > > --
> > > Subscription 
> > > settings:http://groups.google.com/group/web2py/subscribe?hl=en

Reply via email to