[TYPO3-dev] access tables from cron job

Pieter pieter.v at gmx.net
Mon May 22 21:56:48 CEST 2006


Hello,

I wrote a small script to update some fields in fe_users from a cron 
job.  This works fine but I don't have any history records from the 
changes done by the cron job.  And the RefIndex will get out of sync.

Solution: use updateDB() in class.t3lib_tcemain.php instead of 
exec_UPDATEquery

Problem: updateDB requires a back-end user environment.  I get close but 
I don't have a BE_USER profile.  What I did up to now:

require_once(PATH_t3lib.'class.t3lib_tcemain.php');
in a function:
$tce = t3lib_div::makeInstance('t3lib_TCEmain');
$tce->updateDB('fe_users',$row[uid],$updateFields);

This fails because $this->BE_USER is empty.

Is there a way to hack into this?

Regards,
-- 
Pieter Verstraelen
Webteam Vivant
http://www.vivant.org
Skype: callto://pietervsta




More information about the TYPO3-dev mailing list