开发者

CodeIgniter + Tank Auth. How to log user time, sign in, etc

开发者 https://www.devze.com 2023-01-30 09:32 出处:网络
I was hoping someone could clearly explain an easy way of logging the time of a user when they are s开发者_运维问答igned into my website. I want to be able to log this time and then display it for an

I was hoping someone could clearly explain an easy way of logging the time of a user when they are s开发者_运维问答igned into my website. I want to be able to log this time and then display it for an administrator to view.

Thanks in advance,

Filipe


You could combine the users table with ci_sessions table to access the user_agent, ip_address and last_activity columns (last_activity is a timestamp, so use with from_unixtime(last_activity) to get even more info for the admin.


Tank_auth created user table should have a last_login column. You can query that to get the login times.

0

精彩评论

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

关注公众号