How can i get "ID" of User

I have a form that to login. I try to customize 2 file:

UserController.php and UserIdentity.php

public function authenticate()





		else if(md5($this->password)!==$user->password)

               // else if(md5(md5($this->password).Yii::app()->params["salt"])!==$user->password)








		return !$this->errorCode;


How create a Login page ?

please help me

You don’t have to set _id.

You can access user id from Yii::app()->user->id as any other field of user model


But . That I want to know : how to check authentication.

a login