There's a couple of ways of going about this. I'm trying to figure out the easiest.
I think the best thing would be to add a subroutine to db.cgi.
Code:
sub get_email {
#--------------------------------------
my (@lines, $line, @data);
open (PASS, "<$auth_pw_file") or &cgierr ("unable to open: $auth_pw_file.\nReason: $!");
if ($db_use_flock) { flock(PASS, 1) } @lines = <PASS>;
close PASS;
foreach $line (@lines) {
@data = split (/:/, $line);
if ($data[0] eq $db_userid) {
return $data[7];
}
}
}
Then, in your .cfg file, where you define your fields, use
&get_email
as the default value. Don't put quotes around it.
I haven't tested this, but it should work. (I need to put that in my sig file!
)
------------------
JPD