Hi,
i have integrated the secure PW mod into my DB. Everything works exept the &get_email function.
In the .cfg I entered &get_email as default. All I receive is the following error message when adding a new address.
"not found in password file"
When I replace
if ($db_userid eq $userid) {
with
if ("MrX" eq $userid) {
the email address of Mr X is displayed.
What am I doing wrong?
I attached my get_email mod.
Thank you for the help!
Jakob
sub get_email {
# --------------------------------------------------------
# Pulls the email address from the password file.
### Following subroutine added for secure_password_lookup mod
my ($userid, $pw, $view, $add, $del, $mod, $admin, $view_all, $email, $db_userid);
open (PASSWD, "<$auth_pw_file") || &cgierr("unable to open password file. Reason: $!\n");
@passwds = <PASSWD>;
close PASSWD;
foreach $pass (@passwds) { # Go through each pass and see if we match..
next if ($pass =~ /^$/); # Skip blank lines.
next if ($pass =~ /^#/); # Skip Comment lines.
chomp ($pass);
($userid, $pw, $view, $add, $del, $mod, $admin, $view_all, $email, $name, $vorname, $group) = split (/:/, $pass);
if ($db_userid eq $userid) {
return $email;
}
}
return "$db_userid not found in password file";
}
i have integrated the secure PW mod into my DB. Everything works exept the &get_email function.
In the .cfg I entered &get_email as default. All I receive is the following error message when adding a new address.
"not found in password file"
When I replace
if ($db_userid eq $userid) {
with
if ("MrX" eq $userid) {
the email address of Mr X is displayed.
What am I doing wrong?
I attached my get_email mod.
Thank you for the help!
Jakob
sub get_email {
# --------------------------------------------------------
# Pulls the email address from the password file.
### Following subroutine added for secure_password_lookup mod
my ($userid, $pw, $view, $add, $del, $mod, $admin, $view_all, $email, $db_userid);
open (PASSWD, "<$auth_pw_file") || &cgierr("unable to open password file. Reason: $!\n");
@passwds = <PASSWD>;
close PASSWD;
foreach $pass (@passwds) { # Go through each pass and see if we match..
next if ($pass =~ /^$/); # Skip blank lines.
next if ($pass =~ /^#/); # Skip Comment lines.
chomp ($pass);
($userid, $pw, $view, $add, $del, $mod, $admin, $view_all, $email, $name, $vorname, $group) = split (/:/, $pass);
if ($db_userid eq $userid) {
return $email;
}
}
return "$db_userid not found in password file";
}