Location: PHPKode > projects > phpCAMALEO > inc/user_loaddata.inc
<?php
if(!function_exists('user_loaddata'))
{
	#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	# Load user data into global fields
	#
	function user_loaddata($user)
	#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	{
		include($_SESSION[common].'db/Globals.inc');
		include($_SERVER[DOCUMENT_ROOT].$_SESSION[misc][folder].'inc/user_fields.inc');	# 10 Oct 2006
		#
		#	Database checks
		#
		$sth=db_query("SELECT * FROM $user_table WHERE id='$user'");
		if($sth[1]>0)
		{
			$row=db_fetch($sth[0]);
			$_USR=array();
			$_USR[RRN]			=$row[0][RRN];
			$_USR[email]		=$row[0][email];
			$_USR[fname]		=$row[0][fname];
			$_USR[reg_date]		=$row[0][reg_date];
			$_USR[last_log_date]=$row[0][last_log_date];
			$_USR[last_log_ip]	=$row[0][last_log_ip];
			$_USR[visits]		=$row[0][visits];
			$_USR[privil]		=$row[0][privil];
			$_USR[bday]			=$row[0][birthday];
			$_USR[conf_email]	=$row[0][conf_email];
			$_USR[team]			=$row[0][team];
			$_USR[user_tbl_mr]	=$row[0][tbl_max_rows];
			#
			$sth=db_query("SELECT * FROM $user_table"."_teams WHERE RRN='".$row[0][team]."'");
			$tmp=db_fetch($sth[0]);
			$_USR[user_team_desc]=$tmp[0][id];
		}
		else
		{
			return(BuildErrorString($error_msg[1024]).'@1');
		}
		return($_USR);
	}
}
?>
Return current item: phpCAMALEO