<?php
/**
 * User information page
 *
 * Copyright 1999-2001 (c) VA Linux Systems
 * The rest Copyright 2002-2004 (c) GForge Team
 * http://gforge.org/
 *
 * @version   $Id$
 *
 * This file is part of GForge.
 *
 * GForge is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * GForge is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GForge; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

require_once('env.inc.php');
require_once('pre.php');    
require_once('common/include/User.class.php');    

$expl_pathinfo = explode('/', getStringFromServer('REQUEST_URI'));

if (!$expl_pathinfo[2]) {
	exit_error(_('Error'),_('No User Name Provided'));
}

//get the user object based on the user_name in the URL
$user =& user_get_object_by_name($expl_pathinfo[2]);

if (!$user || !is_object($user) || $user->isError() || !$user->isActive()) {

	exit_error(_('That user does not exist.'),_('Invalid User'));

} else {

	$user_id = $user->getID();

	//now show the user page
	include ('user_home.php');

}

// Local Variables:
// mode: php
// c-file-style: "bsd"
// End:

?>
