--- profile_csv.module-orig 2007-10-04 20:10:38.000000000 -0400 +++ profile_csv.module 2007-10-04 23:20:07.000000000 -0400 @@ -74,10 +74,58 @@ ); $form[$set][PROFILE_CSV_PARAM . 'mail'] = array( '#type' => 'checkbox', - '#title' => t('User Email'), + '#title' => t('User Email (Current)'), '#return_value' => 1, '#default_value' => variable_get(PROFILE_CSV_PARAM . 'mail', 0), ); + $form[$set][PROFILE_CSV_PARAM . 'init'] = array( + '#type' => 'checkbox', + '#title' => t('User Email (Initial Account Creation)'), + '#return_value' => 1, + '#default_value' => variable_get(PROFILE_CSV_PARAM . 'init', 0), + ); + $form[$set][PROFILE_CSV_PARAM . 'created'] = array( + '#type' => 'checkbox', + '#title' => t('User Created Date'), + '#return_value' => 1, + '#default_value' => variable_get(PROFILE_CSV_PARAM . 'created', 0), + ); + $form[$set][PROFILE_CSV_PARAM . 'access'] = array( + '#type' => 'checkbox', + '#title' => t('User Most Recent Access Date'), + '#return_value' => 1, + '#default_value' => variable_get(PROFILE_CSV_PARAM . 'access', 0), + ); + $form[$set][PROFILE_CSV_PARAM . 'login'] = array( + '#type' => 'checkbox', + '#title' => t('User Most Recent Login Date'), + '#return_value' => 1, + '#default_value' => variable_get(PROFILE_CSV_PARAM . 'login', 0), + ); + $form[$set][PROFILE_CSV_PARAM . 'theme'] = array( + '#type' => 'checkbox', + '#title' => t('User Default Theme'), + '#return_value' => 1, + '#default_value' => variable_get(PROFILE_CSV_PARAM . 'theme', 0), + ); + $form[$set][PROFILE_CSV_PARAM . 'signature'] = array( + '#type' => 'checkbox', + '#title' => t('User Signature'), + '#return_value' => 1, + '#default_value' => variable_get(PROFILE_CSV_PARAM . 'signature', 0), + ); + $form[$set][PROFILE_CSV_PARAM . 'timezone'] = array( + '#type' => 'checkbox', + '#title' => t('User Timezone'), + '#return_value' => 1, + '#default_value' => variable_get(PROFILE_CSV_PARAM . 'timezone', 0), + ); + $form[$set][PROFILE_CSV_PARAM . 'language'] = array( + '#type' => 'checkbox', + '#title' => t('User Default Language'), + '#return_value' => 1, + '#default_value' => variable_get(PROFILE_CSV_PARAM . 'language', 0), + ); $set = 'profile'; $form[$set] = array( @@ -208,7 +256,7 @@ function _profile_csv_get_user($uid = 0) { $users = array(); - $result = db_query('SELECT u.uid, u.name, u.mail, u.data FROM {users} u WHERE u.uid = %d', $uid); + $result = db_query('SELECT u.uid, u.name, u.mail, u.init, u.created, u.access, u.login, u.theme, u.signature, u.timezone, u.language, u.data FROM {users} u WHERE u.uid = %d', $uid); while ($row = db_fetch_object($result)) { if (variable_get(PROFILE_CSV_PARAM . 'uid', 0)) $users[] = $row->uid; @@ -218,6 +266,31 @@ if (variable_get(PROFILE_CSV_PARAM . 'mail', 0)) $users[] = $row->mail; + + if (variable_get(PROFILE_CSV_PARAM . 'init', 0)) + $users[] = $row->init; + + if (variable_get(PROFILE_CSV_PARAM . 'created', 0)) + $users[] = date("Y/m/d",$row->created); + + if (variable_get(PROFILE_CSV_PARAM . 'access', 0)) + $users[] = $row->access === '0' ? '' : date("Y/m/d",$row->access); + + if (variable_get(PROFILE_CSV_PARAM . 'login', 0)) + $users[] = $row->login === '0' ? '' : date("Y/m/d",$row->login); + + if (variable_get(PROFILE_CSV_PARAM . 'theme', 0)) + $users[] = $row->theme; + + if (variable_get(PROFILE_CSV_PARAM . 'signature', 0)) + $users[] = $row->signature; + + if (variable_get(PROFILE_CSV_PARAM . 'timezone', 0)) + $users[] = $row->timezone; + + if (variable_get(PROFILE_CSV_PARAM . 'language', 0)) + $users[] = $row->language; + $users['data'] = unserialize($row->data); } return $users; @@ -261,9 +334,33 @@ if (variable_get(PROFILE_CSV_PARAM . 'mail', 0)) $row[] = '"mail"'; + if (variable_get(PROFILE_CSV_PARAM . 'init', 0)) + $row[] = '"init"'; + + if (variable_get(PROFILE_CSV_PARAM . 'created', 0)) + $row[] = '"created"'; + + if (variable_get(PROFILE_CSV_PARAM . 'access', 0)) + $row[] = '"access"'; + + if (variable_get(PROFILE_CSV_PARAM . 'login', 0)) + $row[] = '"login"'; + + if (variable_get(PROFILE_CSV_PARAM . 'theme', 0)) + $row[] = '"theme"'; + + if (variable_get(PROFILE_CSV_PARAM . 'signature', 0)) + $row[] = '"signature"'; + + if (variable_get(PROFILE_CSV_PARAM . 'timezone', 0)) + $row[] = '"timezone"'; + + if (variable_get(PROFILE_CSV_PARAM . 'language', 0)) + $row[] = '"language"'; + foreach(_profile_csv_get_profile_fields() as $field) { $row[] = '"'. $field['title'] .'"'; } return implode(",", $row) ."\n"; -} \ No newline at end of file +}