When a logged in user wants to forward a page, his/her username & email should be entered as the default.

Line 39:
  global $base_url;

Change to:
  global $base_url, $user;
Lines 93 & 94:
      $forward_form  = form_textfield(t('Your Name'), 'yname', $yname, 30, '', NULL, NULL, TRUE);
      $forward_form .= form_textfield(t('Your Email'), 'yemail', $yemail, 30, '', NULL, NULL, TRUE);

Change to:
      $forward_form  = form_textfield(t('Your Name'), 'yname', $yname, 30, $user->name, NULL, NULL, TRUE);
      $forward_form .= form_textfield(t('Your Email'), 'yemail', $yemail, 30, $user->email, NULL, NULL, TRUE);
Lines 118 & 119:
    $forward_form  = form_textfield(t('Your Name'), 'yname', '', 30, '', NULL, NULL, TRUE);
    $forward_form .= form_textfield(t('Your Email'), 'yemail', '', 30, '', NULL, NULL, TRUE);

Change to:
    $forward_form  = form_textfield(t('Your Name'), 'yname', '', 30, $user->name, NULL, NULL, TRUE);
    $forward_form .= form_textfield(t('Your Email'), 'yemail', '', 30, $user->email, NULL, NULL, TRUE);

Comments

seanr’s picture

Assigned: Unassigned » seanr
Status: Needs review » Reviewed & tested by the community

That's a great idea!! I'll add that tomorrow (files are on my other computer). Thanks!

seanr’s picture

Status: Reviewed & tested by the community » Fixed

Been fixed for a long time.

seanr’s picture

Status: Fixed » Closed (fixed)