public function actionList() { $criteria = new CDbCriteria(); $data = AdminUser::fetchList($criteria); $this->adminTitle = t('user_account_list', 'admin'); $this->render('list', $data); }
public function search() { $criteria = new CDbCriteria(); $criteria->addColumnCondition(array('t.state' => $this->state)); if ($this->userid) { $criteria->addColumnCondition(array('t.id' => $this->userid)); } if ($this->email) { if ($this->emailFuzzy) { $criteria->addSearchCondition('t.email', $this->email); } else { $criteria->addColumnCondition(array('t.email' => $this->email)); } } if ($this->name) { if ($this->nameFuzzy) { $criteria->addSearchCondition('t.name', $this->name); } else { $criteria->addColumnCondition(array('t.name' => $this->name)); } } $data = $criteria->condition ? AdminUser::fetchList($criteria) : null; return $data; }