Chapter 8, page 197 uses the following:
Yii::app()->user->getId()
which should just be:
Yii::app()->user->id
Chapter 8, page 197 uses the following:
Yii::app()->user->getId()
which should just be:
Yii::app()->user->id
These are both valid and should return the same result. Were you seeing differences in the returned values between these two calls? The latter is just a convenient shorthand for the former.