Model object with empty attributes array

I'm trying Yii for the first time and i generated a base app with the command line utility yiic. I then modified the Identity class as the manual says to authenticate with my User table. The problem is in the authenticate method in the UserIdentity class whrn i fetch the User object via:

$user=User::model()->find('LOWER(username)=?',array($username));

In the $user variable i have a model object but with the attributes property as an empty array so the validation always give a password non valid error. Why?

no one? this is very strange and i’m stuck here right at the beginning :(

i forgot to mention that if i do the same in the yiic shell the AR object variable is populated fine.

Did you try printing $user->username ?