[web2py] Re: How to save the last login datetime

2017-09-07 Thread Sandro Costa
Thank you very much Anthony.

On Tuesday, September 5, 2017 at 6:38:05 PM UTC+1, Anthony wrote:
>
> All logins (and other Auth events) are stored in the db.auth_events table. 
> But if you want to store just the most recent login in the db.auth_user 
> table itself, you can do so using a callback, which can be set up via 
> auth.settings.login_onaccept 
> 
> .
>
> Anthony
>
> On Tuesday, September 5, 2017 at 11:59:15 AM UTC-4, Sandro Costa wrote:
>>
>>
>> I've altered the auth_user model to have some new fields that I need.
>>
>> I'm asking for help to know what I should do to save the date where a 
>> registered user last logged in. Should I change the login function or is 
>> there any way for me to save information in the db after the login.
>>
>> Thank you in advance
>>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: How to save the last login datetime

2017-09-05 Thread Anthony
All logins (and other Auth events) are stored in the db.auth_events table. 
But if you want to store just the most recent login in the db.auth_user 
table itself, you can do so using a callback, which can be set up via 
auth.settings.login_onaccept 

.

Anthony

On Tuesday, September 5, 2017 at 11:59:15 AM UTC-4, Sandro Costa wrote:
>
>
> I've altered the auth_user model to have some new fields that I need.
>
> I'm asking for help to know what I should do to save the date where a 
> registered user last logged in. Should I change the login function or is 
> there any way for me to save information in the db after the login.
>
> Thank you in advance
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.