[sork] INSERT into my own database.table via the passwd backend.php sql driver
Eric Jon Rostetter
eric.rostetter at physics.utexas.edu
Thu Feb 9 12:45:20 PST 2006
Quoting Mark Worsdall <sork at worsdall.demon.co.uk>:
> Was unable to get the perl script to be run from procre because of
> permissions etc, so decided to try and do what the script actually does
> via the sql driver.
Sounds fairly reasonable... But it won't work as is. You would be best
to copy the passwd/lib/Driver/sql.php file to another name, and modify
it to be a new class (e.q. sql_cronjobs) which inherits from the sql class.
Then you could modify the code enough to work for you.
> So I was hoping that horde would take all the values above and execute
> the INSERT command.
Before it does your query_modify, it is going to do a query_lookup.
Since query_lookup is going to fail unless you take great care to set
it up properly, well, the insert will never get done.
> Had this been successful, the script /usr/local/etc/sbin/passwdUpdate.pl
> would have been run by another process.
How would the script know what user to process?
> On the pear_debug at stated it was looking for user_uid, so I even tried
> modifying my table to have those 2 columns, but this still did not work.
>
> Am I to assume that this function will never be able to work?
It could be made to work with a lot of effort, or you could create a new
driver class to do what you want with (I would guess) less effort.
I'd seriously recommend you look into writing a custom driver, or having
someone write such a driver for you.
--
Eric Rostetter
The Department of Physics
The University of Texas at Austin
Go Longhorns!
More information about the sork
mailing list