$_PLUGINS->registerFunction( 'onUserActive', 'addConnection', 'getautoConnectTab' );
class getautoConnectTab extends cbTabHandler {
/**
* Construnctor
*/
function getautoConnectTab() {
$this->cbTabHandler();
}
/**
* Makes the connection
*/
function addConnection($user) {
global $_CB_database,$_CB_framework;
$userid = $user->id;
$membersince = date("Y-m-d");
$sql="INSERT INTO #__comprofiler_members (referenceid, memberid, accepted, pending, membersince) VALUES ('340', '$userid', '1', '0', '$membersince')";
$_CB_database->SetQuery($sql);
$sql="INSERT INTO #__comprofiler_members (referenceid, memberid, accepted, pending, membersince) VALUES ('$userid', '340', '1', '0', '$membersince')";
$_CB_database->SetQuery($sql);
return true;
}
} // end of autoConnectTab class
?>
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
/** ensure this file is being included by a parent file */
removed for posting in form purposes
global $_CB_framework, $_PLUGINS;
$_PLUGINS->registerFunction( 'onAfterUserRegistration', 'addConnection', 'getAutoConnectTab' );
class getAutoConnectTab extends cbTabHandler {
/**
* Construnctor
*/
function getAutoConnectTab() {
$this->cbTabHandler();
}
/**
* Test Function
*/
function testAlert( $user ) {
global $_CB_database,$_CB_framework;
echo '<script type="text/javascript">alert("Alert!!"); </script>';
}
/**
* Makes the connection
*/
function addConnection( &$user ) {
global $_CB_framework, $_CB_database;
echo '<script type="text/javascript">alert("Alert!!"); </script>';
}
} // end of autoConnectTab class
Please Log in to join the conversation.
Please Log in to join the conversation.