Can somebody please help me ? I would really want this to work.
I customized db.auth_user, as described in the book, to add a 'token'
field. I just added : Field('token', writable=False, readable=False,
default='').
Then, in the controllers, I modified default.py :
def user():
db.auth_user.insert(token=request.args(1))
return dict(form=auth())
Then in the models, I modified db.py :
def my_auth_processing(form):
if db(db.auth_user.token!='')
(db.invitation.token==db.auth_user.token):
return True
else :
return False
auth.settings.register_onvalidation.append(lambda form:
my_auth_processing(form))
But unfortunately no one is prevented from registering... So this does
not work.
Dwayne
On 2 juin, 02:31, pbreit <[email protected]> wrote:
> Oops. For registration, you use
> this:http://web2py.com/book/default/chapter/08?search=register_onvalidation