I have hacked the tables and scripts to only have the email address stored in the Users table. I have deleted the Contact Email field in the Links and Validate tables. I have tried to use a variety of codes to pull the email address from the Users table in the sub validate_records routine in the admin.cgi script.
Here are the codes I am currently using:
# Connect to Users table and obtain Email Address for UserID
$userid = $links{$id}{'UserID'};
$db2 = new Links::DBSQL $LINKS{admin_root_path} . "/defs/Users.def";
$rec = $db2->get_record ($userid, 'HASH');
$email = $rec->{'Email'};
I have replaced Contact Email with $email and added $email as a variable to pass to the email subroutines in the Admin_HTML.pm module.
And, of course, I keep getting the bad email address error message and no email is sent to the user.
I have experimented this for the past two days with no progress. I am using similar codes in the add.cgi and modify.cgi script and the codes work fine (email is sent to the admin from the email address pulled from the Users table)...I know it is more complicated with the validation function. I have also tried putting the above codes in the email subroutines in the Admin_HTML.pm file and also in the sub html_validate_form. When I put the codes in the validate form subroutine, the email address is pulled into the email-del.txt file.
If you have any suggestions for fixing the codes I've posted, I would greatly appreciate it.
Thanks in advance.
Regards,
Eliot
Here are the codes I am currently using:
Code:
# Connect to Users table and obtain Email Address for UserID
$userid = $links{$id}{'UserID'};
$db2 = new Links::DBSQL $LINKS{admin_root_path} . "/defs/Users.def";
$rec = $db2->get_record ($userid, 'HASH');
$email = $rec->{'Email'};
I have replaced Contact Email with $email and added $email as a variable to pass to the email subroutines in the Admin_HTML.pm module.
And, of course, I keep getting the bad email address error message and no email is sent to the user.
I have experimented this for the past two days with no progress. I am using similar codes in the add.cgi and modify.cgi script and the codes work fine (email is sent to the admin from the email address pulled from the Users table)...I know it is more complicated with the validation function. I have also tried putting the above codes in the email subroutines in the Admin_HTML.pm file and also in the sub html_validate_form. When I put the codes in the validate form subroutine, the email address is pulled into the email-del.txt file.
If you have any suggestions for fixing the codes I've posted, I would greatly appreciate it.
Thanks in advance.
Regards,
Eliot