--- loncom/interface/lonpreferences.pm 2018/04/27 22:42:20 1.227 +++ loncom/interface/lonpreferences.pm 2019/04/24 01:44:30 1.228 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.227 2018/04/27 22:42:20 raeburn Exp $ +# $Id: lonpreferences.pm,v 1.228 2019/04/24 01:44:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1263,7 +1263,7 @@ sub verify_and_change_colors { # password handler subroutines # ###################################################### sub passwordchanger { - my ($r,$errormessage,$caller,$mailtoken) = @_; + my ($r,$errormessage,$caller,$mailtoken,$timelimit,$extrafields) = @_; # This function is a bit of a mess.... # Passwords are encrypted using londes.js (DES encryption) $errormessage = ($errormessage || ''); @@ -1299,7 +1299,7 @@ sub passwordchanger { return; } if (defined($data{time})) { - if (time - $data{'time'} < 7200) { + if (time - $data{'time'} < $timelimit) { $user = $data{'username'}; $domain = $data{'domain'}; $currentpass = $data{'temppasswd'}; @@ -1362,7 +1362,7 @@ sub passwordchanger { my $jsh=Apache::File->new($include."/londes.js"); $r->print(<$jsh>); } - $r->print(&jscript_send($caller)); + $r->print(&jscript_send($caller,$extrafields)); $r->print(< ENDFORM - $r->print(&server_form($logtoken,$caller,$mailtoken)); - $r->print(&client_form($caller,\%hexkey,$currentpass,$domain)); + $r->print(&server_form($logtoken,$caller,$mailtoken,$extrafields)); + $r->print(&client_form($caller,\%hexkey,$currentpass,$domain,$extrafields)); # return; } sub jscript_send { - my ($caller) = @_; + my ($caller,$extrafields) = @_; my $output = qq|