Project

General

Profile

Revision 8254

ensure all emailed links make sense for the UI that initiated them. also format referrals using the same options as the primary accounts (recursive call needed the html parameter). https://projects.ecoinformatics.org/ecoinfo/issues/6066

View differences:

ldapweb.cgi
376 376
    my $notHtmlFormat = 1;
377 377
    my $found = findExistingAccounts($ldapurl, $searchBase, $filter, \@attrs, $notHtmlFormat);
378 378
    my $accountInfo;
379
    if($found) {
379
    if ($found) {
380 380
        $accountInfo = $found;
381 381
    } else {
382
        my $link = $contextUrl. '/cgi-bin/ldapweb.cgi?cfg=' . $skinName;
383
        $accountInfo = "There are no accounts associated with the email " . $mail . ".\n" .
384
                       "You may create a new one by the following link: \n" . $link
382
        $accountInfo = "There are no accounts associated with the email " . $mail . ".\n";
385 383
    }
386
    
387
    
388
    
384

  
389 385
    my $mailhost = $properties->getProperty('email.mailhost');
390 386
    my $sender;
391 387
    $sender = $skinProperties->getProperty("email.sender") or $sender = $properties->getProperty('email.sender');
......
874 870

  
875 871
    my $errorMessage = "";
876 872
    if ($recipient) {
873
    	
874
    	# use the appropriate link
875
		my $link = '/' . $context . '/cgi-bin/ldapweb.cgi?stage=changepass&cfg=' . $cfg;
876
		my $overrideURL;
877
	    $overrideURL = $skinProperties->getProperty("email.overrideURL");
878
	    debug("the overrideURL is " . $overrideURL);
879
	    if (defined($overrideURL) && !($overrideURL eq '')) {
880
	    	$link = $serverUrl . $overrideURL . $link;
881
	    } else {
882
	    	$link = $serverUrl . $link;
883
	    }
884
    
877 885
        my $mailhost = $properties->getProperty('email.mailhost');
878 886
        my $sender;
879 887
        $sender = $skinProperties->getProperty("email.sender") or $sender = $properties->getProperty('email.sender');
......
888 896
        Subject: Your Account Password Reset
889 897
        
890 898
        Somebody (hopefully you) requested that your account password be reset.  
891
        This is generally done when somebody forgets their password.  Your 
892
        password can be changed by visiting the following URL:
899
        Your temporary password is below. Please update your password to 
900
        something permanent by visiting the following URL:
893 901

  
894
        $contextUrl/cgi-bin/ldapweb.cgi?stage=changepass&cfg=$cfg
902
        $link
895 903

  
896 904
            Username: $username
897 905
        Organization: $org
......
984 992
        	my $host = $uri->host();
985 993
        	my $path = $uri->path();
986 994
        	$path =~ s/^\///;
987
        	my $refFound = &findExistingAccounts($host, $path, $filter, $attref);
995
        	my $refFound = &findExistingAccounts($host, $path, $filter, $attref, $notHtmlFormat);
988 996
        	if ($refFound) {
989 997
            	$foundAccounts .= $refFound;
990 998
        	}
......
1153 1161
    From: $sender
1154 1162
    Subject: New Account Activation
1155 1163
        
1156
    Somebody (hopefully you) registered an account on $metacatUrl.  
1164
    Somebody (hopefully you) registered an account on $contextUrl.  
1157 1165
    Please click the following link to activate your account.
1158 1166
    If the link doesn't work, please copy the link to your browser:
1159 1167
    

Also available in: Unified diff