Chapter 7

At page 163-164, we have the following lines :

… UserIdentity::authenticiate() is as follows…

But what follows is not correct and neither needed as the whole class is overwritten at page 165-166!

The method has been already described correctly at page 161-162. My observation may be wrong as I have reached only page 168.

There are plenty of typographic errors too, throughout the book.

But overall the book is an excellent read, despite poor proof reading.

Your observation is not wrong. This is a printing error in the book. The code snippet on page 163 that outlines the authenticate method for the UserIdentity class is from the code generator of the previous version of Yii (1.0).

The book was started using version 1.0 and then upgraded later to be compatible with version 1.1.2. Unfortunately, this small snippet of code was not altered from the original version. As you mention, this is really not needed and only printed for a quick reference to the auto-generated code. It does not impact the application or the discussion about authentication in Yii.

Thank you for pointing this out, we will fix this in subsequent versions of this book.