--- loncom/auth/lonauth.pm 2021/11/03 01:04:02 1.169 +++ loncom/auth/lonauth.pm 2021/11/17 00:44:47 1.170 @@ -1,7 +1,7 @@ # The LearningOnline Network # User Authentication Module # -# $Id: lonauth.pm,v 1.169 2021/11/03 01:04:02 raeburn Exp $ +# $Id: lonauth.pm,v 1.170 2021/11/17 00:44:47 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -42,11 +42,12 @@ use Apache::lonlocal; use Apache::File(); use HTML::Entities; use Digest::MD5; +use CGI::Cookie(); # ------------------------------------------------------------ Successful login sub success { my ($r, $username, $domain, $authhost, $lowerurl, $extra_env, - $form,$skipcritical,$cid) = @_; + $form,$skipcritical,$cid,$expirepub) = @_; # ------------------------------------------------------------ Get cookie ready my $cookie = @@ -233,6 +234,12 @@ sub success { if ($defaultcookie) { $r->headers_out->add('Set-cookie' => $defaultcookie); } + if ($expirepub) { + my $c = new CGI::Cookie(-name => 'lonPubID', + -value => '', + -expires => '-10y',); + $r->headers_out->add('Set-cookie' => $c); + } $r->send_http_header; my ($start_page,$js,$pagebody,$end_page);