--- loncom/auth/lonauth.pm 2006/08/30 16:50:23 1.81 +++ loncom/auth/lonauth.pm 2006/08/30 22:12:11 1.82 @@ -1,7 +1,7 @@ # The LearningOnline Network # User Authentication Module # -# $Id: lonauth.pm,v 1.81 2006/08/30 16:50:23 albertel Exp $ +# $Id: lonauth.pm,v 1.82 2006/08/30 22:12:11 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -180,7 +180,7 @@ sub success { } &add_to_env($idf,\%initial_env); - &add_to_env($idf,\%userenv); + &add_to_env($idf,\%userenv,'environment.'); &add_to_env($idf,$userroles); &add_to_env($idf,$extra_env); close($idf); @@ -250,10 +250,10 @@ ENDSUCCESS } sub add_to_env { - my ($idf,$env_data) = @_; - @env{keys(%$env_data)} = @$env_data{keys(%$env_data)}; + my ($idf,$env_data,$prefix) = @_; while (my ($key,$value) = each(%$env_data)) { - print $idf (&escape($key).'='.&escape($value)."\n"); + print $idf (&escape($prefix.$key).'='.&escape($value)."\n"); + $env{$prefix.$key} = $value; } }