Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Re: [Jagerman] How to update User table with an external global?

Quote Reply
Re: [Jagerman] How to update User table with an external global? In reply to
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:

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";
}
dave

Big Cartoon DataBase
Big Comic Book DataBase
Subject Author Views Date
Thread How to update User table with an external global? Franco 4632 May 19, 2004, 7:40 AM
Thread Re: [Franco] How to update User table with an external global?
Jagerman 4461 May 19, 2004, 12:45 PM
Thread Re: [Jagerman] How to update User table with an external global?
carfac 4421 May 21, 2004, 11:40 AM
Post Re: [carfac] How to update User table with an external global?
carfac 4415 May 21, 2004, 12:22 PM
Post Re: [carfac] How to update User table with an external global?
carfac 4410 May 21, 2004, 12:35 PM
Post Re: [Jagerman] How to update User table with an external global?
Franco 4424 May 21, 2004, 12:56 PM