version 1.11.2.1, 2009/09/14 14:48:20
|
version 1.15, 2009/02/23 20:28:21
|
Line 124 sub get_uname {
|
Line 124 sub get_uname {
|
proc => 'Proceed'); |
proc => 'Proceed'); |
|
|
my $msg = &mt('If you use the same account for other campus services besides LON-CAPA, (e.g., e-mail, course registration, etc.), a separate centrally managed mechanism likely exists to reset a password. However, if your account is used for just LON-CAPA access you will probably be able to reset a password from this page.'); |
my $msg = &mt('If you use the same account for other campus services besides LON-CAPA, (e.g., e-mail, course registration, etc.), a separate centrally managed mechanism likely exists to reset a password. However, if your account is used for just LON-CAPA access you will probably be able to reset a password from this page.'); |
$msg .= &mt('Three conditions must be met:') |
$msg .= '<br /><br />'.&mt('Three conditions must be met:') |
.'<ul><li>'.&mt('An e-mail address must have previously been associated with your GCI WebCenter username.').'</li>' |
.'<ul><li>'.&mt('An e-mail address must have previously been associated with your LON-CAPA username.').'</li>' |
.'<li>'.&mt('You must be able to access e-mail sent to that address.').'</li>' |
.'<li>'.&mt('You must be able to access e-mail sent to that address.').'</li>' |
.'<li>'.&mt('Your LON-CAPA account must be of a type for which LON-CAPA can reset a password.') |
.'<li>'.&mt('Your LON-CAPA account must be of a type for which LON-CAPA can reset a password.') |
.'</ul>'; |
.'</ul>'; |
Line 133 sub get_uname {
|
Line 133 sub get_uname {
|
<form name="forgotpw" method="post"> |
<form name="forgotpw" method="post"> |
<table> |
<table> |
<tr><td> |
<tr><td> |
<tr><td align="left">GCI WebCenter $lt{'unam'}: </td> |
<tr><td align="left">LON-CAPA $lt{'unam'}: </td> |
<td><input type="text" name="uname" size="15" /> </td></tr> |
<td><input type="text" name="uname" size="15" /> </td></tr> |
<tr><td align="left">GCI WebCenter $lt{'udom'}: </td> |
<tr><td align="left">LON-CAPA $lt{'udom'}: </td> |
<td>|; |
<td>|; |
$msg .= &Apache::loncommon::select_dom_form($defdom,'udom'); |
$msg .= &Apache::loncommon::select_dom_form($defdom,'udom'); |
$msg .= qq|</td></tr> |
$msg .= qq|</td></tr> |
<tr><td align="left">$lt{'uemail'}: </td> |
<tr><td align="left">$lt{'uemail'}: </td> |
<td><input type="text" name="useremail" size="30" /></td></tr> |
<td><input type="text" name="useremail" size="30" /></td></tr> |
<tr><td colspan="2" align="left"><br /> |
<tr><td colspan="2" align="left"><br /> |
<input type="button" value="$lt{'proc'}" onClick="document.forgotpw.submit()"></td></tr> |
<input type="submit" value="$lt{'proc'}"></td></tr> |
</table> |
</table> |
</form> |
</form> |
|; |
|; |
Line 168 sub send_token {
|
Line 168 sub send_token {
|
my $esc_token = &escape($token); |
my $esc_token = &escape($token); |
my $showtime = &Apache::lonlocal::locallocaltime(time); |
my $showtime = &Apache::lonlocal::locallocaltime(time); |
my $reseturl = &Apache::lonnet::absolute_url().'/adm/resetpw?token='.$esc_token; |
my $reseturl = &Apache::lonnet::absolute_url().'/adm/resetpw?token='.$esc_token; |
my $mailmsg = &mt('A request was submitted on [_1] for a 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 $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, |
my $result = &send_mail($domdesc,$email,$mailmsg,$contact_name, |
$contact_email); |
$contact_email); |
if ($result eq 'ok') { |
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.<br /><br />The link included in the message will be valid for the next <b>two</b> 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.<br /><br />The link included in the message will be valid for the next <b>two</b> hours."); |
} else { |
} 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); |
$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); |
} |
} |
Line 265 sub reset_passwd {
|
Line 265 sub reset_passwd {
|
$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] - (<a href="mailto:[_2]">[_2]</a>) for assistance.',$contact_name,$contact_email); |
} |
} |
} else { |
} 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).'<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 />'); |
$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.').'<br />'); |
$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.').'<br />'); |
&Apache::lonpreferences::passwordchanger($r,'','reset_by_email',$token); |
&Apache::lonpreferences::passwordchanger($r,'','reset_by_email',$token); |
} |
} |