you can assign the new id to the variable and pass it to add_membership()
function
pls try (not tested, and change group_id with the group id number you want
to assign)
for kardex in db(db.kardex).select():
new_user_id = db.auth_user.validate_and_insert(
first_name=kardex.first_name, last_name=kardex.last_name,
email=kardex.email, password=kardex.password)
auth.add_membership(group_id, new_user_id)
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.