Diff for /loncom/interface/resetpw.pm between versions 1.16 and 1.17

version 1.16, 2009/04/04 21:47:41 version 1.17, 2009/04/29 16:57:29
Line 234  sub reset_passwd { Line 234  sub reset_passwd {
     my %data = &Apache::lonnet::tmpget($token);      my %data = &Apache::lonnet::tmpget($token);
     my $now = time;      my $now = time;
     if (keys(%data) == 0) {      if (keys(%data) == 0) {
         $msg = &mt('Sorry, the URL you provided to complete the reset of your password was invalid.  Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a <a href="/adm/resetpw">new request</a> for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.');          $msg = &mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.'
                     ,'<a href="/adm/resetpw">','</a>');
         return $msg;          return $msg;
     }      }
     if (($data{'time'} =~ /^\d+$/) &&       if (($data{'time'} =~ /^\d+$/) && 
Line 260  sub reset_passwd { Line 261  sub reset_passwd {
                     } else {                      } else {
                         $msg .= &mt('An error occurred when sending e-mail to [_1] confirming setting of your new password.',$data{'email'});                          $msg .= &mt('An error occurred when sending e-mail to [_1] confirming setting of your new password.',$data{'email'});
                     }                      }
                     $msg .= '<br /><br />'.&mt('<a href="/adm/login">Go to the login page</a>.');                      $msg .= '<br /><br />'
                              .'<a href="/adm/login">'.&mt('Go to the login page').'</a>.';
                 } else {                  } else {
                     $msg .= &mt('A problem occurred when attempting to reset the password for your account.  Please contact the [_1] - (<a href="mailto:[_2]">[_2]</a>) for assistance.',$contact_name,$contact_email);                      $msg .= &mt('A problem occurred when attempting to reset the password for your account. Please contact the [_1] - ([_2]) for assistance.'
                                  ,$contact_name
                                  ,'<a href="mailto:'.$contact_email.'">'.$contact_email.'</a>');
                 }                  }
             } else {              } else {
                 $r->print(&mt('The token included in an e-mail sent to you [_1] has been verified, so you may now proceed to reset the password for your LON-CAPA account.',$reqtime).'<br /><br />');                  $r->print(&mt('The token included in an e-mail sent to you [_1] has been verified, so you may now proceed to reset the password for your LON-CAPA account.',$reqtime).'<br /><br />');
Line 270  sub reset_passwd { Line 274  sub reset_passwd {
                 &Apache::lonpreferences::passwordchanger($r,'','reset_by_email',$token);                  &Apache::lonpreferences::passwordchanger($r,'','reset_by_email',$token);
             }              }
         } else {          } else {
             $msg = &mt('Sorry, the token generated when you requested a password reset has expired. Please submit a <a href="/adm/resetpw">new request</a>, and follow the link to the web page included in the new e-mail that will be sent to you, to allow you to enter a new password.');              $msg = &mt('Sorry, the token generated when you requested a password reset has expired. Please submit a [_1]new request[_2], and follow the link to the web page included in the new e-mail that will be sent to you, to allow you to enter a new password.'
                         ,'<a href="/adm/resetpw">','</a>');
         }          }
     } else {      } else {
         $msg .= &mt('Sorry, the URL generated when you requested reset of your password contained incomplete information. Please submit a <a href="/adm/resetpw">new request</a> for a password reset, and use the new URL that will be sent to your e-mail account to complete the process.');          $msg .= &mt('Sorry, the URL generated when you requested reset of your password contained incomplete information. Please submit a [_1]new request[_2] for a password reset, and use the new URL that will be sent to your e-mail account to complete the process.'
                      ,'<a href="/adm/resetpw">','</a>');
     }      }
     return $msg;      return $msg;
 }  }

Removed from v.1.16  
changed lines
  Added in v.1.17


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>