When a user makes a purchase, he is automatically added to a usergroup using the following code (I pass the usergroup id through the url). Anyway, it used to work in 5.0 alpha, but stopped working after I upgraded to beta. Can you please tell me what’s wrong with it (I think the include paths are wrong..but I can’t figure out where they are now)…
<?php $path = $_SERVER[‘DOCUMENT_ROOT’]; $path .= “/wp-content/simple-forum/library/sf-common-functions.php”; include_once($path);
$path1 = $_SERVER[‘DOCUMENT_ROOT’]; $path1 .= “/wp-content/simple-forum/library/sf-primitives.php”; include_once($path1);
$path2 = $_SERVER[‘DOCUMENT_ROOT’]; $path2 .= “/wp-content/simple-forum/library/sf-permissions.php”; include_once($path2);
$path3 = $_SERVER[‘DOCUMENT_ROOT’]; $path3 .= “/wp-content/simple-forum/library/sf-database.php”; include_once($path3);
$usergroup_id=$_REQUEST[‘group’];
$user_id=$_REQUEST[‘userid’]; sfc_add_membership($usergroup_id, $user_id);
?>
Hey Chica! Thank you for joining our Celebrity Photographer’s 4-week Critique. You have been added to your photographer’s private classroom in the forum <a href=”http://<?php echo $_REQUEST[‘forumlink’]; ?>”>(http://<?php echo $_REQUEST[‘forumlink’]; ?>)</a>. You may need to logout and login again in order to see the posts.