[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface createaccount.pm

raeburn raeburn@source.lon-capa.org
Thu, 02 Dec 2010 22:51:27 -0000


raeburn		Thu Dec  2 22:51:27 2010 EDT

  Modified files:              (Branch: GCI_3)
    /loncom/interface	createaccount.pm 
  Log:
  - Customization for GCI_3.
    - Backport 1.44. 
  
  
Index: loncom/interface/createaccount.pm
diff -u loncom/interface/createaccount.pm:1.37.2.5 loncom/interface/createaccount.pm:1.37.2.6
--- loncom/interface/createaccount.pm:1.37.2.5	Thu Dec  2 02:15:11 2010
+++ loncom/interface/createaccount.pm	Thu Dec  2 22:51:27 2010
@@ -3,7 +3,7 @@
 # institutional log-in ID (institutional authentication required - localauth
 #  or kerberos) or an e-mail address.
 #
-# $Id: createaccount.pm,v 1.37.2.5 2010/12/02 02:15:11 raeburn Exp $
+# $Id: createaccount.pm,v 1.37.2.6 2010/12/02 22:51:27 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1152,16 +1152,21 @@
     if ($msgtext) {
         $msg .= '<br />'.$msgtext;
     }
-    $msg .= &linkto_email_help($contact_email,$domdesc);
+    $msg .= &linkto_email_help($contact_email,$domdesc,$error);
     return $msg;
 }
 
 sub linkto_email_help {
-    my ($contact_email,$domdesc) = @_;
+    my ($contact_email,$domdesc,$error) = @_;
     my $msg;
     if ($contact_email ne '') {
         my $escuri = &HTML::Entities::encode('/adm/createaccount','&<>"');
-        $msg .= '<br />'.&mt('You may wish to contact the [_1]LON-CAPA helpdesk[_2] for [_3].','<a href="/adm/helpdesk?origurl='.$escuri.'">','</a>',$domdesc).'<br />';
+        my $href = '/adm/helpdesk?origurl='.$escuri;
+        if ($error eq 'existinguser') {
+            my $escemail = &HTML::Entities::encode($env{'form.useremail'});
+            $href .= '&useremail='.$escemail.'&useraccount='.$escemail;
+        }
+        $msg .= '<br />'.&mt('You may wish to contact the [_1]LON-CAPA helpdesk[_2] for [_3].','<a href="'.$href.'">','</a>',$domdesc).'<br />';
     } else {
         $msg .= '<br />'.&mt('You may wish to send an e-mail to the server administrator: [_1] for [_2].',$Apache::lonnet::perlvar{'AdminEmail'},$domdesc).'<br />';
     }