Authentication Manager Allowautologin Mechanism ?

hi every body

we kow that yii has agood authentication manager with multiple options

among these option is allowautologin. if isset to true then userid,name,states will be stored in a cookie so with future login these info will be retrived, validated & if true it will be propagated to user session

good, first login time i need the posted username and password the following is a typical example:


// Login a user with the provided username and password.

$identity=new UserIdentity($username,$password);

if($identity->authenticate())

    Yii::app()->user->login($identity);

else

    echo $identity->errorMessage;

......

// Logout the current user

Yii::app()->user->logout();

my question is what is the code for subsequent login if autologin is set to true and what is the mechanism for subsequent logins?

note that it’s logic to authenticate every request comming from user.

See CWebUser::restoreFromCookie.

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

fine how to emplement subsequent request authentication at controller?