User Login Details

how can i retrieve user login details with session and cookies

theUser = User::model()->findByPk(Yii::app()->user->id);

To log-in users stored in a database, download the "Blog" demo and use the file protected/components/UserIdentity.php and protected/models/User.php.

I suggest to forget the session when dealing with user logins.