I made a mod into the Comm code in web/user.pm. I was never very happy that Comm inserted a valid user into Links. Comm inserts a "Registered" user when a user applies for membership, NOT when they validate your account. I modified Comm so that once a user validates their e-mail, THEN user.pm update a user to Registered.
The code I used is in "sub user_verify"
The problem I am getting is a "Lost connection to MySQL server during query"
Here is the code in question:
require lib;
lib->import('/path/to/Links/admin');
my $other_db = new GT::SQL '/path/to/Links/admin/defs';
my $user_db = $other_db->table ('Users');
$user_db->update ( {
Status => 'Registered'
}, { Username => $user->{comm_username} }) or die "Can't Update: $GT::SQL::error";
Any idea why this might be happening, or better, how I can clean this up?
Thanks!
dave
Big Cartoon DataBase
Big Comic Book DataBase
The code I used is in "sub user_verify"
The problem I am getting is a "Lost connection to MySQL server during query"
Here is the code in question:
Code:
require lib;
lib->import('/path/to/Links/admin');
my $other_db = new GT::SQL '/path/to/Links/admin/defs';
my $user_db = $other_db->table ('Users');
$user_db->update ( {
Status => 'Registered'
}, { Username => $user->{comm_username} }) or die "Can't Update: $GT::SQL::error";
Any idea why this might be happening, or better, how I can clean this up?
Thanks!
dave
Big Cartoon DataBase
Big Comic Book DataBase