column_fields["assigned_user_id"]; $this->db->println("assign_user ".$ass_user." cur_user=".$current_user->id); if( $ass_user != $current_user->id) { $this->db->println("searching and assigning ".$ass_user); $result = $this->db->pquery("select id from vtiger_users where id = ? union select groupid as id from vtiger_groups where groupid = ?", array($ass_user, $ass_user)); if($this->db->num_rows($result)!=1) { $this->db->println("not exact records setting current userid"); $this->column_fields["assigned_user_id"] = $current_user->id; } else { $row = $this->db->fetchByAssoc($result, -1, false); if (isset($row['id']) && $row['id'] != -1) { $this->db->println("setting id as ".$row['id']); $this->column_fields["assigned_user_id"] = $row['id']; } else { $this->db->println("setting current userid"); $this->column_fields["assigned_user_id"] = $current_user->id; } } } } // Module Sequence Numbering function modseq_number() { $this->column_fields['lead_no'] = ''; } // END /** Constructor which will set the importable_fields as $this->importable_fields[$key]=1 in this object where key is the fieldname in the field table */ function ImportLead() { parent::Leads(); $this->log = LoggerManager::getLogger('import_lead'); $this->db = PearDatabase::getInstance(); $this->db->println("IMP ImportLead"); $this->initImportableFields("Leads"); $this->db->println($this->importable_fields); } } ?>