2

我现在正在开发一个 yii 应用程序。我已经使用审计跟踪来记录我的模型,包括添加、编辑、删除。但是我如何使用审计跟踪将登录/登录部分记录到我的数据库中?

4

1 回答 1

0

您需要继承 CWebUSer 并扩展 afterLogin() 方法。你可以按照这个教程

http://www.yiiframework.com/doc/api/1.1/CWebUser#afterLogin-detail

This method is called after the user is successfully logged in. 
You may override this method to do some postprocessing 
(e.g. log the user login IP and time; load the user permission information).
于 2014-03-22T09:34:21.690 回答