예제 #1
0
 public function editUser($nUserId, $aParam)
 {
     $oModelUserParm = new Admin_Model_UserParam();
     if (is_numeric($nUserId) && $nUserId > 0) {
         try {
             $this->_db->beginTransaction();
             $oRow = $this->find($nUserId)->current();
             if ($oRow instanceof Zend_Db_Table_Row_Abstract) {
                 $oRow->user_role_id = $aParam["role_id"];
                 $oRow->is_active = $aParam["is_active"];
                 if ($oRow->save()) {
                     if ($oModelUserParm->editUserParam($nUserId, $aParam)) {
                         $this->_db->commit();
                     }
                 }
             }
         } catch (Zend_Exception $e) {
             $this->_db->rollBack();
             return null;
         }
     }
     return null;
 }