J-Man:
This is something I was working on for a while, and gave up on.... but this thread has started me on it again. What I am trying to go is get GTComm to update Links and Forum User Tables when I disable a user. Basically, when I disable a user in GTComm, I want it to go and disable the user, as well as turn off any Mail things in their profiles...
I have had it updating Links for a while, but I still have to go update Foryum, because (as above) I could never get forum)Users to update.
Followed the instructions above, and I get this error:
Can't call method "fetchrow_array" on an undefined value at /hd2/web/f/forum/public_html/forum/admin/GForum/Table/User.pm line 275. GT::SQL::error => Failed to execute query: 'SELECT user_id,user_username,user_status FROM forum_User WHERE Username = ?' Reason: Unknown column 'Username' in 'where clause' OK
I am GUESSING I need to somehow pass the Username over to Forum???
Here is the code I am using in Community::Web:Admin:
require lib;
lib->import('/hd2/web/b/bcdb/public_html/bcdb/admin');
lib->import('/hd2/web/f/forum/public_html/forum/admin');
my $other_db = new GT::SQL '/hd2/web/b/bcdb/public_html/bcdb/admin/defs';
my $user_db = $other_db->table ('Users');
my $other_db1 = new GT::SQL '/hd2/web/f/forum/public_html/forum/admin/defs';
$GForum::DB = $other_db1;
my $user_db1 = $other_db1->table ('User');
... blah blah...
if ($user->{comm_enabled} == '0') {
$user_db1->update ( {
user_enabled => '0',
user_admin_validated => '0',
user_default_reply_notify => '0',
user_status => '1',
user_message_notify => '0',
user_real_name => "$user->{prof_first_name} $user->{prof_last_name}",
user_homepage => $user->{prof_website},
user_member => $user->{comm_member},
user_occupation => $user->{prof_occupation},
user_location => $user->{prof_location}
}, { Username => $user->{comm_username} }) or die "Can't Update: $GT::SQL::error";
}dave
Big Cartoon DataBase
Big Comic Book DataBase
This is something I was working on for a while, and gave up on.... but this thread has started me on it again. What I am trying to go is get GTComm to update Links and Forum User Tables when I disable a user. Basically, when I disable a user in GTComm, I want it to go and disable the user, as well as turn off any Mail things in their profiles...
I have had it updating Links for a while, but I still have to go update Foryum, because (as above) I could never get forum)Users to update.
Followed the instructions above, and I get this error:
Quote:
Can't call method "fetchrow_array" on an undefined value at /hd2/web/f/forum/public_html/forum/admin/GForum/Table/User.pm line 275. GT::SQL::error => Failed to execute query: 'SELECT user_id,user_username,user_status FROM forum_User WHERE Username = ?' Reason: Unknown column 'Username' in 'where clause' OK
I am GUESSING I need to somehow pass the Username over to Forum???
Here is the code I am using in Community::Web:Admin:
Quote:
require lib;
lib->import('/hd2/web/b/bcdb/public_html/bcdb/admin');
lib->import('/hd2/web/f/forum/public_html/forum/admin');
my $other_db = new GT::SQL '/hd2/web/b/bcdb/public_html/bcdb/admin/defs';
my $user_db = $other_db->table ('Users');
my $other_db1 = new GT::SQL '/hd2/web/f/forum/public_html/forum/admin/defs';
$GForum::DB = $other_db1;
my $user_db1 = $other_db1->table ('User');
... blah blah...
if ($user->{comm_enabled} == '0') {
$user_db1->update ( {
user_enabled => '0',
user_admin_validated => '0',
user_default_reply_notify => '0',
user_status => '1',
user_message_notify => '0',
user_real_name => "$user->{prof_first_name} $user->{prof_last_name}",
user_homepage => $user->{prof_website},
user_member => $user->{comm_member},
user_occupation => $user->{prof_occupation},
user_location => $user->{prof_location}
}, { Username => $user->{comm_username} }) or die "Can't Update: $GT::SQL::error";
}
Big Cartoon DataBase
Big Comic Book DataBase