public function updateCampaignsAction()
 {
     if ($this->_request->isPost()) {
         if ($this->_request->getPost()) {
             $form_values = $this->_request->getPost();
             $users = $this->_em->find('Users', $form_values['user_id']);
             $users->setUserName($form_values['user_name_update']);
             $users->setEmail($form_values['user_name_update']);
             $users->setCellNumber('03423423423');
             $users->setLoginId($form_values['user_name_update']);
             if ($form_values['office_type_edit'] == '1') {
                 $role = $this->_em->find('Roles', 14);
                 $location_id = '10';
             }
             if ($form_values['office_type_edit'] == '2') {
                 $role = $this->_em->find('Roles', 15);
                 $location_id = $form_values['combo1_edit'];
             }
             if ($form_values['office_type_edit'] == '4') {
                 $role = $this->_em->find('Roles', 16);
                 $location_id = $form_values['combo2_edit'];
             }
             $loc_id = $this->_em->find('Locations', $location_id);
             $users->setLocation($loc_id);
             $users->setRole($role);
             $stakeholder = $this->_em->find('Stakeholders', 10);
             $users->setStakeholder($stakeholder);
             $user = $this->_em->find('Users', $this->_userid);
             $users->setCreatedBy($user);
             $this->_em->persist($users);
             $this->_em->flush();
             $user_id = $users->getPkId();
             if ($form_values['office_type_edit'] == '4') {
                 $warehouse_users = $this->_em->getRepository("WarehouseUsers")->findBy(array('user' => $form_values['user_id']));
                 foreach ($warehouse_users as $warehouse_users_a) {
                     $wh_id = $this->_em->find('WarehouseUsers', $warehouse_users_a->getPkId());
                     $this->_em->remove($wh_id);
                     $this->_em->flush();
                 }
                 $warehouses = new Model_Warehouses();
                 $warehouses->form_values = $form_values;
                 $warehouses->form_values['page'] = "campaigns";
                 $warehouse_id = $warehouses->getWarehouseIdByUcIdUpdate();
                 foreach ($warehouse_id as $wh_id_w) {
                     $warehouse_users = new WarehouseUsers();
                     $wh_id = $this->_em->find('Warehouses', $wh_id_w);
                     $warehouse_users->setWarehouse($wh_id);
                     $user_id_i = $this->_em->find('Users', $user_id);
                     $warehouse_users->setUser($user_id_i);
                     $this->_em->persist($warehouse_users);
                     $this->_em->flush();
                 }
             }
         }
     }
     $this->_redirect("/iadmin/manage-users/campaigns-users");
 }