--- loncom/interface/resetpw.pm 2008/12/06 20:35:15 1.12 +++ loncom/interface/resetpw.pm 2009/04/04 21:47:41 1.16 @@ -1,6 +1,8 @@ # The LearningOnline Network # Allow access to password changing via a token sent to user's e-mail. # +# $Id: resetpw.pm,v 1.16 2009/04/04 21:47:41 bisitz Exp $ +# # Copyright Michigan State University Board of Trustees # # This file is part of the LearningOnline Network with CAPA (LON-CAPA). @@ -132,15 +134,15 @@ sub get_uname { - + - + +
LON-CAPA $lt{'unam'}:
LON-CAPA $lt{'udom'}: |; $msg .= &Apache::loncommon::select_dom_form($defdom,'udom'); $msg .= qq|
$lt{'uemail'}:

-
|; @@ -164,14 +166,13 @@ sub send_token { my $token = &Apache::lonnet::tmpput(\%info,$server,'resetpw'); if ($token !~ /^error/ && $token ne 'no_such_host') { my $esc_token = &escape($token); - my $mailmsg = "A request was submitted on ".&Apache::lonlocal::locallocaltime(time)." for a reset of the ". - "password for your LON-CAPA account.". - "To complete this process please open a web browser and enter the following ". - "URL in the address/location box: ".&Apache::lonnet::absolute_url()."/adm/resetpw?token=$esc_token"; + my $showtime = &Apache::lonlocal::locallocaltime(time); + my $reseturl = &Apache::lonnet::absolute_url().'/adm/resetpw?token='.$esc_token; + my $mailmsg = &mt('A request was submitted on [_1] for reset of the password for your LON-CAPA account.',$showtime).' '.&mt('To complete this process please open a web browser and enter the following URL in the address/location box: [_1]',$reseturl); my $result = &send_mail($domdesc,$email,$mailmsg,$contact_name, $contact_email); if ($result eq 'ok') { - $msg .= &mt("An e-mail message sent to the e-mail address associated with your LON-CAPA account includes the web address for the link you should use to complete the reset process.

The link included in the message will be valid for the next two hours."); + $msg .= &mt("An e-mail sent to the e-mail address associated with your LON-CAPA account includes the web address for the link you should use to complete the reset process.

The link included in the message will be valid for the next two hours."); } else { $msg .= &mt("An error occurred when sending a message to the e-mail address associated with your LON-CAPA account. Please contact the [_1] ([_2]) for assistance.",$contact_name,$contact_email); } @@ -264,7 +265,7 @@ sub reset_passwd { $msg .= &mt('A problem occurred when attempting to reset the password for your account. Please contact the [_1] - ([_2]) for assistance.',$contact_name,$contact_email); } } else { - $r->print(&mt('The token included in an email sent to you [_1] has been verified, so you may now proceed to reset the password for your LON-CAPA account.',$reqtime).'

'); + $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).'

'); $r->print(&mt('Please enter the username and domain of the LON-CAPA account, and the associated e-mail address, for which you are setting a password. The new password must contain at least 7 characters.').' '.&mt('Your new password will be sent to the LON-CAPA server in an encrypted form.').'
'); &Apache::lonpreferences::passwordchanger($r,'','reset_by_email',$token); }