Hi,
Ich habe in meiner View zii.widgets.grid.CGridView eingebaut um mir alle Benutzer anzeigen zu lassen.
Nun erhalte ich jedoch nur Benutzer angezeigt die im Status 1 sind. Dies habe ich jedoch nirgendswo eingestellt.
Könnt ihr mir erklären, warum yii diese Bedingung von sich aus erstellt:
((status=:ycp0) AND (facebook_login=:ycp1)) AND (group_id=:ycp2)
<?php $this->widget('zii.widgets.grid.CGridView', array
(
'id' => 'users-grid',
'dataProvider' => $oUser->search(),
'filter' => $oUser,
'pager' => array(
'pageSize' => 20,
),
'columns' => array
(
..........
)
?>
public function search()
{
$oCriteria = new CDbCriteria;
$oCriteria->compare('id',$this->id);
$oCriteria->compare('username',$this->username,true);
$oCriteria->compare('prename',$this->prename,true);
$oCriteria->compare('surname',$this->surname,true);
$oCriteria->compare('email',$this->email,true);
$oCriteria->compare('group_id',$this->group_id);
return new CActiveDataProvider($this, array(
'criteria' => $oCriteria,
'pagination' => array(
'pageSize' => 20,
),
));
}
CDbCriteria Object
(
[select] => *
[distinct] =>
[condition] => ((status=:ycp0) AND (facebook_login=:ycp1)) AND (group_id=:ycp2)
[params] => Array
(
[:ycp0] => 1
[:ycp1] => 0
[:ycp2] => 0
)
[limit] => -1
[offset] => -1
[order] =>
[group] =>
[join] =>
[having] =>
[with] =>
[alias] =>
[together] =>
[index] =>
[scopes] =>
[_e:CComponent:private] =>
[_m:CComponent:private] =>
)
thx