Oh I didn't understand the initial question. Here's one way to go about it, though I'm sure there are other (possibly easier) ways to do it. You first need to create a form for inserting users, and then protect it.
The form can be created with CRUD. In your controller: @auth.requires_login() #restricts function def add_user(): form=crud.create(db.auth_user) #Create form for inserting users return dict(form=form) #Return the form to a view Then in add_user.html the form is inserted with: {{=form}} Crud will automatically generate a SQLFORM for the table with self submission and validation. You can read on CRUD in the manual here: http://web2py.com/book/default/section/7/6?search=CRUD You can read on Authentication in the manual here: http://web2py.com/book/default/section/8/2?search=Decorators I think once you understand how to generate a form based on a table, and how to require access with decorators or just enforcing authorization via CRUD you'll fully understand how to do what you're trying. What I've shown is just one way to do it, I'm sure there's many many ways to On Jun 30, 1:30 pm, Deepan <nicky3...@gmail.com> wrote: > I am clear with first point. > > Not with second one. > > How can I make only registered users to create new users....right now > when I am logged in and click on register it redirects me to profile > page. > > Thanks > > On Jun 30, 12:03 pm, Chris S <sanders.ch...@gmail.com> wrote: > > > Check out the book located atwww.web2py.com/bookyou'llfind a lot of > > useful information in it. > > > For 1: > > Section 8.1 talks about restricting > > registrationhttp://www.web2py.com/book/default/section/8/1?search=Restrictions+on... > > > For 2: > > Section 8.2 talks about the settings built into Auth. I believe > > you're looking for > > login_nexthttp://www.web2py.com/book/default/section/8/2?search=login_next > > > The search function on the book is fairly good, once you get use to > > some of the words you're looking for. > > > On Jun 30, 9:24 am, Deepan <nicky3...@gmail.com> wrote: > > > > Hi, > > > > I am relatively new to web2py. It would be great if somebody can guide > > > me through this issues. > > > > 1. way to disable registration for anonymous users of the app. > > > > 2. When I am logged in as a authenticated user I'm redirected to my > > > profile page instead of registration page. > > > > Please let me know how to fix this issues. > > > > Thanks for the help! > >