How to add more information to Yii::app()->user

Comparing #1 with #2

Revision #2 was created by qiang qiang on Feb 9, 2009, 1:25:11 PM.

Added security note

Content

[...]
$id=Yii::app()->user->id;
$lastLoginTime=Yii::app()->user->getState('lastLoginTime');
// starting from 1.0.3 you can use the following:
// $lastLoginTime=Yii::app()->user->lastLoginTime;
```

 
> Note: When cookie-based authentication is enabled (by setting [CWebUser::allowAutoLogin] to be true), these persistent information will be stored in cookie. Therefore, you should NOT store sensitive information (e.g. password) like we do in the above.