--- loncom/lonnet/perl/lonnet.pm 2003/03/23 09:00:51 1.347 +++ loncom/lonnet/perl/lonnet.pm 2003/03/24 14:18:58 1.348 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.347 2003/03/23 09:00:51 albertel Exp $ +# $Id: lonnet.pm,v 1.348 2003/03/24 14:18:58 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -600,12 +600,12 @@ sub assign_access_key { $uname=$ENV{'user.domain'} unless (defined($uname)); my %existing=&get('accesskeys',[$ckey],$cdom,$cnum); if (($existing{$ckey}=~/^\d+$/) || # has time - new key - ($existing{$ckey} eq $udom.':'.$uname)) { # this should not happen, + ($existing{$ckey} eq $uname.':'.$udom)) { # this should not happen, # unless something went wrong # the first time around # ready to assign } elsif (!$existing{$ckey}) { - if (&put('accesskey',{$ckey=>$udom.':'.$uname},$cdom,$cnum) eq 'ok') { + if (&put('accesskey',{$ckey=>$uname.':'.$udom},$cdom,$cnum) eq 'ok') { # key now belongs to user my $envkey='key.'.$cdom.'_'.$cnum; if (&put('environment',{$envkey => $ckey}) eq 'ok') { @@ -671,7 +671,7 @@ sub validate_access_key { $udom=$ENV{'user.name'} unless (defined($udom)); $uname=$ENV{'user.domain'} unless (defined($uname)); my %existing=&get('accesskeys',[$ckey],$cdom,$cnum); - return ($existing{$ckey} eq $udom.':'.$uname); + return ($existing{$ckey} eq $uname.':'.$udom); } # ------------------------------------- Find the section of student in a course