Hi,
I try to update the GForum User table throw a global in Links SQL. Here the global I try to use in Links SQL:
sub {
my $vars = shift;
my $user_id = $vars->{user_id};
use lib '/path/to/GForum/admin';
my $tu = GT::SQL->new ("/path/to/GForum/admin/defs");
$tu->table('User')->update( { user_something => '1' }, { user_id => $user_id } );
}
When I try the global, I receive this error:
Can't call method "table" on an undefined value at /path/to/GForum/admin/GForum/Table/User.pm line 360.
The global works with the Post or Forum table, but not with the User table. It's probably a permission problem, but I don't know how to solve it.
Thank you very much for your help!
François
I try to update the GForum User table throw a global in Links SQL. Here the global I try to use in Links SQL:
Code:
sub {
my $vars = shift;
my $user_id = $vars->{user_id};
use lib '/path/to/GForum/admin';
my $tu = GT::SQL->new ("/path/to/GForum/admin/defs");
$tu->table('User')->update( { user_something => '1' }, { user_id => $user_id } );
}
When I try the global, I receive this error:
Code:
Can't call method "table" on an undefined value at /path/to/GForum/admin/GForum/Table/User.pm line 360.
The global works with the Post or Forum table, but not with the User table. It's probably a permission problem, but I don't know how to solve it.
Thank you very much for your help!
François