Hello,
I am trying to debug my form. I put a debugger on the very last position in the on submit event.
Apart from the debugger there is a custom code element with this code:
This code doesn't seem to get execute though, or it fails on the addUserToGroup method.
The debugging information after hitting the submit button is not shown. It just reloads the page. Do i have to enable something else?
I am trying to debug my form. I put a debugger on the very last position in the on submit event.
Apart from the debugger there is a custom code element with this code:
<?php
$group_id_clanmembers = 11;
$group_id_registered = 2;
$user_id = intval($form->data['player']);
jimport( 'joomla.user.helper' );
JUserHelper::addUserToGroup($user_id, $group_id_registered);
JUserHelper::removeUserFromGroup($user_id, $group_id_clanmembers);
$db =& JFactory::getDBO();
$query = "update #__players set clan_id = null WHERE user_id = $user_id";
$db->setQuery($query);
$db->query();
?>
This code doesn't seem to get execute though, or it fails on the addUserToGroup method.
The debugging information after hitting the submit button is not shown. It just reloads the page. Do i have to enable something else?