function get_leads_columns($user_name, $session) { if (!validateSession($user_name, $session)) { return null; } global $current_user, $log; require_once "modules/Users/Users.php"; $seed_user = new Users(); $user_id = $seed_user->retrieve_user_id($user_name); $current_user = $seed_user; $current_user->retrieve_entity_info($user_id, 'Users'); if (isPermitted("Leads", "index") == "yes") { require_once 'modules/Leads/Leads.php'; $lead = new Leads(); $log->debug($lead->getColumnNames_Lead()); return $lead->getColumnNames_Lead(); } else { $return_array = array(); return $return_array; } }