I believe this:
if db(auth.table_user.email == form.vars.email).count(): should be: if (db.auth_user.email == form.vars.email).count(): Is that correct?
I believe this:
if db(auth.table_user.email == form.vars.email).count(): should be: if (db.auth_user.email == form.vars.email).count(): Is that correct?