title: how to return model in function with Yii
body: <p>I want to check if a user with the specified ID was created or not, if not I will create a new user and return it. And if the user already existed, I will return it. When I do this, the server can't load. I have 2 functions:</p>
  
  <pre><code>public function actionCreateNewUser() {
      $aID = "4324";
      $rs = $this-&gt;canCreateNewUser($aID);
  }
  public function canCreateNewUser($aID) {
      $rsUser = User::model()-&gt;find('AID=:aID', array('aID' =&gt; $aID));
      return $rsUser[0];
  }
  </code></pre>