[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Mon, 09 Dec 2002 22:09:58 -0000
matthew Mon Dec 9 17:09:58 2002 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
Change to &modifyuser. When creating a user the call to &get('environment'..
does not return an error the way the code seemed to expect it to. We were
ending up with keys in 'evironment.db' of "error:No such file or directory".
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.312 loncom/lonnet/perl/lonnet.pm:1.313
--- loncom/lonnet/perl/lonnet.pm:1.312 Mon Dec 9 14:04:44 2002
+++ loncom/lonnet/perl/lonnet.pm Mon Dec 9 17:09:58 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.312 2002/12/09 19:04:44 www Exp $
+# $Id: lonnet.pm,v 1.313 2002/12/09 22:09:58 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2350,10 +2350,15 @@
}
}
# -------------------------------------------------------------- Add names, etc
- my %names=&get('environment',
+ my @tmp=&get('environment',
['firstname','middlename','lastname','generation'],
$udom,$uname);
- if ($names{'firstname'} =~ m/^error:.*/) { %names=(); }
+ my %names;
+ if ($tmp[0] =~ m/^error:.*/) {
+ %names=();
+ } else {
+ %names = @tmp;
+ }
if ($first) { $names{'firstname'} = $first; }
if ($middle) { $names{'middlename'} = $middle; }
if ($last) { $names{'lastname'} = $last; }