Try if auth.user: user_id=auth.user_id else: user_id=0
then db.table.field.default=user_id it should work On May 17, 12:36 pm, Jason Brower <[email protected]> wrote: > I have a table that needs to have a default to the current user in one > of the fields. > I am using auth() and just put default=auth.user.id and it didn't seem > to help. Any ideas? > Regards, > Jason --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

