[web2py] Re: Find name of user with a given id: Auth table issues

2015-06-15 Thread zimani
Ok, i have dropped me and am now using just user. I will try to find a solution and update what the error is. Thanks a lot for all your prompt help. On Monday, 15 June 2015 14:45:15 UTC+2, Anthony wrote: > > On Monday, June 15, 2015 at 4:57:51 AM UTC-4, zimani wrote: >> >> hi Anthony, i apologis

[web2py] Re: Find name of user with a given id: Auth table issues

2015-06-15 Thread Anthony
On Monday, June 15, 2015 at 4:57:51 AM UTC-4, zimani wrote: > > hi Anthony, i apologise for the late response, i had no access to the > internet the whole weekend. > > Maybe i should clarify. I am customising this from one of your tutorials > "Web development with python and web2py " part 1 and 2

[web2py] Re: Find name of user with a given id: Auth table issues

2015-06-15 Thread zimani
hi Anthony, i apologise for the late response, i had no access to the internet the whole weekend. Maybe i should clarify. I am customising this from one of your tutorials "Web development with python and web2py " part 1 and 2 The 'user' in this case is the person that posted a post. Hence if i u

[web2py] Re: Find name of user with a given id: Auth table issues

2015-06-12 Thread Anthony
If you have: user = db.auth_user(id) Then there is no need for the "me" variable -- just use user.usealiasname. However, if id is the same as auth.user_id, then you don't even need the above line -- just use auth.user (which holds the whole user record). If it still isn't working, then there i

[web2py] Re: Find name of user with a given id: Auth table issues

2015-06-12 Thread zimani
Its supposed to be the same. But this does not work. All i am doing is checking if this user: db.auth_user(id) wants to use an aliasname or not. Of which aliasname is a field in auth_user table On Friday, 12 June 2015 15:11:19 UTC+2, zimani wrote: > > I apologise, i have been trying too many thi

[web2py] Re: Find name of user with a given id: Auth table issues

2015-06-12 Thread zimani
I apologise, i have been trying too many things: me=db(db.auth_user.id == id).select(db.auth_user.usealiasname).first().usealiasname This is what i currently have. On Friday, 12 June 2015 14:54:57 UTC+2, Anthony wrote: > > > > On Friday, June 12, 2015 at 8:36:43 AM UTC-4, zimani wrote: >> >>

[web2py] Re: Find name of user with a given id: Auth table issues

2015-06-12 Thread Anthony
On Friday, June 12, 2015 at 8:36:43 AM UTC-4, zimani wrote: > > I have this code: > > def author(id): > if id is None: > return "Unknown" > else: > user = db.auth_user(id) > me=db(db.auth_user.id == > id).select(db.auth_user.usealiasname).first().usealiasname >