function _feedback_user_info in Feedback 5
1 call to _feedback_user_info()
- feedback_mail_form_submit in ./
feedback.module - Process the site-wide form submission.
File
- ./
feedback.module, line 464 - Enables a site-wide feedback page.
Code
function _feedback_user_info(&$edit, $page) {
global $user;
$info = "\n" . t('Site Name') . ': ' . variable_get('site_name', '');
if ($user->name) {
$info .= "\n" . t('Registered name') . ': ' . feedback_plain_text($user->name);
}
if ($page->field_name) {
$info .= "\n" . t('Entered Name') . ': ' . feedback_plain_text($edit['emailname']);
}
$info .= "\n" . t('E-mail address') . ': ' . $edit['mail'];
if ($page->field_postal) {
$info .= "\n" . t('Postal address') . ': ' . feedback_plain_text($edit['postal']);
}
if ($page->field_phone) {
$info .= "\n" . t('Phone Number') . ': ' . feedback_plain_text($edit['phone']);
}
if ($edit['referer']) {
$info .= "\n" . t('Referring page') . ': ' . feedback_plain_text($edit['referer']);
}
if (isset($_SERVER['REMOTE_ADDR'])) {
$info .= "\n" . t('IP Address') . ': ' . 'http://whois.domaintools.com/' . feedback_plain_text($_SERVER['REMOTE_ADDR']);
}
if (isset($_SERVER['REMOTE_HOST'])) {
$info .= "\n" . t('Machine name') . ': ' . feedback_plain_text($_SERVER['REMOTE_HOST']);
}
if (isset($_SERVER['HTTP_USER_AGENT'])) {
$info .= "\n" . t('Browser info') . ': ' . feedback_plain_text($_SERVER['HTTP_USER_AGENT']);
}
return $info;
}