title: Class UserIdentity not returning properties in Yii
body: <p>i made this code with a tutorial:</p>
  
  <pre><code>class UserIdentity extends CUserIdentity
  {
      private $_id;
      private $_email;
  
      public function authenticate()
      {
          $user=User::model()-&gt;findByAttributes(array('username'=&gt;$this-&gt;username));
          if($user===null)
              $this-&gt;errorCode=self::ERROR_USERNAME_INVALID;
          else if($user-&gt;password!==md5($this-&gt;password))
              $this-&gt;errorCode=self::ERROR_PASSWORD_INVALID;
          else
          {
              $this-&gt;_id=$user-&gt;id;
              $this-&gt;_email=$user-&gt;email;
              $this-&gt;errorCode=self::ERROR_NONE;
          }
          return !$this-&gt;errorCode;
      }
  
      public function getId()
      {
          return $this-&gt;_id;
      }
  }
  </code></pre>
  
  <p>And i try to save that ID of the user, but it does not return the ID, it returns the emailadres, and the email is not defined when calling it like:</p>
  
  <pre><code>echo Yii::app()-&gt;user-&gt;email;
  </code></pre>
  
  <p>Please help me! Im new to Yii!</p>