简体   繁体   English

CodeIgniter + Tank身份验证。 如何记录用户时间,登录等

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

I was hoping someone could clearly explain an easy way of logging the time of a user when they are signed 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 菲利普

您可以将users表与ci_sessions表结合使用,以访问user_agent,ip_address和last_activity列(last_activity是一个时间戳,因此与from_unixtime(last_activity)结合使用可获取更多有关管理员的信息。

Tank_auth created user table should have a last_login column. Tank_auth创建的用户表应具有last_login列。 You can query that to get the login times. 您可以查询以获取登录时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM