Ccomponent Error

Hallow guys, am new in Yii framework, i started with following the book Agile webdevelopment, but i get stack at chapter six, where we want to authenticate login details using the value stored in database instead of admin/admin or demo/demo. But after changing UserIdentity class and when trying to login i got the error

[color="#FF0000"]User and its behaviors do not have a method or closure named "encrypt".[/color]

You have to add method ‘encrypt’ to model User :)

The error is simply saying you don’t have an ‘encrypt’ function/method! You have to implement this function to make it work.

The next, you can see and share your problem at the link Agile Web Application Development with Yii1.1 and PHP5.