Project

General

Profile

« Previous | Next » 

Revision 8182

Added by Jing Tao about 11 years ago

Fixed a bug that the url link was not correct in the email.

View differences:

ldapweb.cgi
923 923
                $dn='ou=' . $ou . ',' . $tmpSearchBase;
924 924
             }
925 925
            # Do the insertion
926
            debug(" 1-1 here is the additions " . $additions); 
927
            debug(" 2-1 here is the additions " . @$additions);
928
            debug(" 3-1 here is the additions " . [@$additions]); 
929 926
            my $result = $ldap->add ( 'dn' => $dn, 'attr' => [ @$additions ]);
930 927
            if ($result->code()) {
931 928
                fullTemplate( ['registerFailed', 'register'], { stage => "register",
......
993 990
    
994 991
    
995 992
    ####################send the verification email to the user
996
    my $link = $cgiUrl . 'cfg=' . $skinName . '&' . 'stage=' . $emailVerification . '&' . 'dn=' . $dn . '&' . 'hash=' . $randomStr;
993
    my $link = $contextUrl. '/cgi-bin/ldapweb.cgi?cfg=' . $skinName . '&' . 'stage=' . $emailVerification . '&' . 'dn=' . $dn . '&' . 'hash=' . $randomStr;
997 994
    
998 995
    my $mailhost = $properties->getProperty('email.mailhost');
999 996
    my $sender =  $properties->getProperty('email.sender');
......
1022 1019
    
1023 1020
     $smtp->data($message);
1024 1021
     $smtp->quit;
1025
    
1022
    debug("the link is " . $link);
1026 1023
    fullTemplate( ['success'] );
1027 1024
    
1028 1025
}

Also available in: Unified diff