[LON-CAPA-cvs] cvs: loncom /auth lonauth.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Sat, 14 Sep 2002 05:45:45 -0000
albertel Sat Sep 14 01:45:45 2002 EDT
Modified files:
/loncom/auth lonauth.pm
Log:
- I have a couple of dreams
1) to never see a call to reply outside of lonnet.pm
2) to see the use of esace/unescape minimized
3) world peace
- Anyway this change has the side effect of fixing the problems with %20
etc appearing in the middle of names.
(Don't be afraid of lonnet::dump/get/put etc, they try to do it right.)
Index: loncom/auth/lonauth.pm
diff -u loncom/auth/lonauth.pm:1.31 loncom/auth/lonauth.pm:1.32
--- loncom/auth/lonauth.pm:1.31 Wed May 29 10:51:42 2002
+++ loncom/auth/lonauth.pm Sat Sep 14 01:45:45 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network
# User Authentication Module
#
-# $Id: lonauth.pm,v 1.31 2002/05/29 14:51:42 www Exp $
+# $Id: lonauth.pm,v 1.32 2002/09/14 05:45:45 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -107,15 +107,13 @@
# ------------------------------------------------------------- Get environment
- my $userenv=Apache::lonnet::reply("dump:$domain:$username:environment",
- $authhost);
- if (($userenv eq 'con_lost') ||
- ($userenv =~ /^error\:/)) {
- $userenv='';
- }
- $userenv=~s/\&/\nenvironment\./g;
- if ($userenv ne '') {
- $userenv='environment.'.$userenv;
+ my $userenv;
+ my %userenv=Apache::lonnet::dump('environment',$domain,$username);
+ my ($tmp) = keys(%userenv);
+ if ($tmp !~ /^(con_lost|error|no_such_host)/i) {
+ foreach my $key (keys(%userenv)) {
+ $userenv.="environment.$key=$userenv{$key}\n";
+ }
}
# --------------------------------------------------------- Write first profile