Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [katabd] Users Plug In help

Quote Reply
Re: [katabd] Users Plug In help In reply to
You need to make sure you only pass fields to the update, that are present in the User table. The error you report probably occurs if somebody uses your plugin in dynamic mode. A quick solution (which is not the most secure one) is to delete a few possible inputs, such as
Code:
delete $args->{d};
delete $args->{s};
delete $args->{t};
A better solution would be to get a list of fields in the Users table, assign the user input to them, delete the dangerous ones (such as Username, Status, etc), and then update the desired record. You'll need
Code:
my $cols = $DB->table('Users')->{schema}->{cols};
where $cols is a hashref whose keys are the field names of the Users table.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Subject Author Views Date
Thread Users Plug In help katabd 1901 Jul 15, 2003, 11:08 PM
Thread Re: [katabd] Users Plug In help
yogi 1799 Jul 16, 2003, 12:16 AM
Post Re: [yogi] Users Plug In help
katabd 1774 Jul 16, 2003, 7:33 AM