--- loncom/lonnet/perl/lonnet.pm 2003/07/03 19:26:21 1.386 +++ loncom/lonnet/perl/lonnet.pm 2003/07/05 10:07:11 1.387 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.386 2003/07/03 19:26:21 matthew Exp $ +# $Id: lonnet.pm,v 1.387 2003/07/05 10:07:11 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2732,7 +2732,7 @@ sub modifyuser { my ($udom, $uname, $uid, $umode, $upass, $first, $middle, $last, $gene, - $forceid, $desiredhome)=@_; + $forceid, $desiredhome, $email)=@_; $udom=~s/\W//g; $uname=~s/\W//g; &logthis('Call to modify user '.$udom.', '.$uname.', '.$uid.', '. @@ -2801,10 +2801,14 @@ sub modifyuser { } else { %names = @tmp; } + if (defined($first)) { $names{'firstname'} = $first; } if (defined($middle)) { $names{'middlename'} = $middle; } if (defined($last)) { $names{'lastname'} = $last; } if (defined($gene)) { $names{'generation'} = $gene; } + if (defined($email)) { $names{'notification'} = $email; + $names{'critnotification'} = $email; } + my $reply = &put('environment', \%names, $udom,$uname); if ($reply ne 'ok') { return 'error: '.$reply; } &logthis('Success modifying user '.$udom.', '.$uname.', '.$uid.', '. @@ -2818,7 +2822,7 @@ sub modifyuser { sub modifystudent { my ($udom,$uname,$uid,$umode,$upass,$first,$middle,$last,$gene,$usec, - $end,$start,$forceid,$desiredhome)=@_; + $end,$start,$forceid,$desiredhome,$email)=@_; my $cid=''; unless ($cid=$ENV{'request.course.id'}) { return 'not_in_class'; @@ -2826,7 +2830,7 @@ sub modifystudent { # --------------------------------------------------------------- Make the user my $reply=&modifyuser ($udom,$uname,$uid,$umode,$upass,$first,$middle,$last,$gene,$forceid, - $desiredhome); + $desiredhome,$email); unless ($reply eq 'ok') { return $reply; } # This will cause &modify_student_enrollment to get the uid from the # students environment