Location: PHPKode > projects > ProjectPress > projectpress/projects/join.php
<?php
/**
 * ProjectPress join a project
 *
 * @package ProjectPress
 * @since 2.0
 */

// Starts the session.
session_start();
define('access',true);
require_once(dirname(dirname(__FILE__)) . '/config.inc.php');
require_once(PM_DIR . 'pm-includes/global.inc.php');

if($current_user->hasPermission('access_site') != true) { pm_redirect(PM_URI . '/index.php'); }
	
	if($_REQUEST['projectId'])
	{
		$username = $_SESSION['username'];
		
		pmdb::connect()->query("INSERT INTO ".DB."project_members (pp_id,pm_user) VALUES('".$_REQUEST['projectId']."','".$username."')");

	}
Return current item: ProjectPress