Skip to Content Skip to Menu

How To Get PHP To Work With Auto Actions

  • mba90008
  • mba90008
  • OFFLINE
  • Posts: 10
  • Thanks: 1
  • Karma: 0
10 years 3 months ago #246830 by mba90008
Hi...

I've read a couple of other forum entries on this topic but I'm still a bit confused on what syntax can be used within cb for auto actions. I want to use a script I've written to update a database table before and after user login. When I've test my script (directly)...it works fine...my data table updates. But when I place the same code into auto action under Type:CODE....nothing happens when the triggers are activated. Here is my script and also the settings that I've selected within auto actions....

Method: PHP(eval)
Return: Silent

<?php
$db=JFactory::getDbo();
$profile_rank=400;
$db->setQuery("UPDATE #_comprofiler SET cb_rank='$profile_rank' WHERE id>=300");
$db->query();
?>

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum