Gossamer Forum
Home : Products : Others : Gossamer Community :

Delete User Error

Quote Reply
Delete User Error
Tried unsuccessfully to delete a user from within Community.
Links, forums, and community are all new installs currently in testing phase.
The user was created with Community.

Unable to delete user: Error:
$!:
$@: GT::SQL::Table (92584): Wrong argument passed to this subroutine. Usage: Could not create a condition object out of arguments. at /home/username/domains/domain.com/public_html/cgi-bin/admin/Links/Table/Users.pm line 88.
$GT::SQL::error: GT::SQL::Table (92584): Wrong argument passed to this subroutine. Usage: Could not create a condition object out of arguments. at /home/username/domains/domain.com/public_html/cgi-bin/admin/Links/Table/Users.pm line 88.

Any ideas?


Users.pm

sub _plg_delete {
# -------------------------------------------------------------------
init();
my ($self, $cond) = @_;
if (! ref $cond) {
$cond = { Username => $cond };
}
my $count = 0;
my $link_db = $Links::DB->table('Links');
my $sth = $self->select('Username', $cond);
while (my ($user) = $sth->fetchrow_array) {
my @links = $link_db->select('ID', { LinkOwner => $user })->fetchall_list;
for my $link_id (@links) {
$link_db->delete($link_id);
}
if (Links::Authenticate::auth('del_user', { Username => $user })) {
88 my $ret = $self->SUPER::delete($user);
$count++ if $ret;
}
}
return $count;
}



Sincerely,

Rob Wesley
Aboriginal Connections (Indigenous Peoples Worldwide)
robwesley@aboriginalconnections.com
Web Directory | Forums

Last edited by:

wesley: Mar 14, 2005, 1:48 AM
Quote Reply
Re: [wesley] Delete User Error In reply to
Hi,

Code:
Could not create a condition object out of arguments
This is quite hard to track down, and we are working on improving our debugging. Basically it means you have a foreign key that references a table that does not exist. Typically this is caused by uninstalling a plugin that does not properly clean up after itself.

To fix, you need to start at defs/prefix_Users.def and look at fk_tables, then go through each table referenced until you find a foreign key that does not exist.

Hope that helps,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Delete User Error In reply to
Yes indeed, yes indeed, thanks Alex I found the culprit - A plugin I installed then removed cause the plugin didn't work for me.

Thank you

Sincerely,

Rob Wesley
Aboriginal Connections (Indigenous Peoples Worldwide)
robwesley@aboriginalconnections.com
Web Directory | Forums

Last edited by:

wesley: May 4, 2005, 7:52 PM