title: Yii CGridView: how to add a static WHERE condtion?
body: <p>I've a standard Gii created admin view, which use a CGridView, and it's showing my user table data.</p>
  
  <p>the problem is  that user with name 'root' must NOT BE VISIBLE.</p>
  
  <p>Is there a way to add a static where condition " ... and username !='root' " ?</p>
  
  <p>admin.php [view]</p>
  
  <pre><code>'columns'=&gt;array(
      'id',
      'username',
      'password',
      'realname',
      'email',
              .....
  </code></pre>
  
  <p>user.php [model]</p>
  
  <pre><code>    public function search()
  {
      // Warning: Please modify the following code to remove attributes that
      // should not be searched.
  
      $criteria=new CDbCriteria;
  
      $criteria-&gt;compare('id',$this-&gt;id);
      $criteria-&gt;compare('username',$this-&gt;username,true);
      $criteria-&gt;compare('password',$this-&gt;password,true);
      $criteria-&gt;compare('realname',$this-&gt;realname,true);
      $criteria-&gt;compare('email',$this-&gt;email,true);
  
      ......
  
  
      return new CActiveDataProvider($this, array(
          'criteria'=&gt;$criteria,
      ));
  }
  </code></pre>