开发者

How do you tamper AuthLogic to show me the "last" last_login_at?

开发者 https://www.devze.com 2023-02-06 00:03 出处:网络
I would like to code the progress of events that have changed since someone had last logged in. Authlogic provides a last_login_at, but that is the datetime of when the user logged in even though he

I would like to code the progress of events that have changed since someone had last logged in.

Authlogic provides a last_login_at, but that is the datetime of when the user logged in even though he may be currently still logged on开发者_Go百科.

I'm trying to find the time when they were logged in before that. So that when a user logs in, I have a log of the last time they were logged in, and I can show them all the things that have changed since then.

I looked into AuthLogic::Session::MagicColumns which is the method that supports last_login_at, but was unable to find anything useful.

Any ideas?


I haven't read anything like this relating to Authlogic. It seems like you are going to have to write some custom session code to store that datetime you want. You could override the method in Authlogic that sets last_login_at and migrate the old value over to your new database column.

0

精彩评论

暂无评论...
验证码 换一张
取 消