public function init() { if ($this->_request->getActionName() == 'index') { $this->addFilteringTexbox('loginid', 'loginid'); $this->addFilteringTexbox('firstname', 'firstname'); } $groupid = $this->_request->getParam('groupid', ''); $userid = $this->getRequestId(); if ($groupid != '') { $group = new Sam_Model_User_Group(); $group->find($groupid); if ($group instanceof Sam_Model_User_Group) { $group->addUser($userid); } } $certificateid = $this->_request->getParam('certificate', ''); if ($certificateid != '') { $cer = new Eau_Model_Auditor_Certificate(); $cer->find($certificateid); if ($cer instanceof Eau_Model_Auditor_Certificate) { $cer->addUser($userid); } } parent::init(); }
public function getCertificateList() { if ($this->id != '') { $cer = new Eau_Model_Auditor_Certificate(); return $cer->fetchAll($cer->select()->where("user_id=?", $this->id)); } return null; }