Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $http.post('/myapp/authentication/register', user)
- def register():
- return dict(form=auth.register())
- def register():
- username = request.vars.username
- password = request.vars.password
- email = request.vars.email
- row = db.auth_user(username=username)
- if not row:
- db.auth_user.insert(username=username, password=password, email=email)
- else:
- raise HTTP(409, 'username exists')
- login_bare(self, username, password)
- db.auth_user.insert(username=username, password=password, email=email)
- db.auth_user.validate_and_insert(username=username, password=password,
- email=email)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement