<?php
///////////////////////////////////////////////////////////////////////////////////////
// PHPizabi 0.848b C1 [ALICIA]                               http://www.phpizabi.net //
///////////////////////////////////////////////////////////////////////////////////////
// Please read the license.txt file before using / modifying this software           //
// Original author:         Claude Desjardins, R - feedback@realitymedias.com        //
// Last modification date:  August 13th 2006                                         //
// Version:                 PHPizabi 0.848b C1                                       //
//                                                                                   //
// (C) 2005, 2006 Real!ty Medias / PHPizabi - All rights reserved                    //
///////////////////////////////////////////////////////////////////////////////////////

	/* Check Structure Availability */
	if (!defined("CORE_STRAP")) die("Out of structure call");
	
	function heritage_override($userID) {
		global $CONF;

		$heritage = unpk(file_get_contents($CONF["HERITAGE_INFOFILE"]));
		
		/*
			Save on DB access, if "$userID" is "me", we will use the ME function
			instead, or get the user heritage ID ...
		*/
		if (is_numeric($userID) and $userID != me("id")) $heritageID = _fnc("user", $userID, "account_type");
		elseif ($userID == me("id") or $userID == "me") $heritageID = me("account_type");

		if (isset($heritageID) && is_numeric($heritageID) && $heritageID != 0 && is_array($heritage) && isset($heritage[$heritageID])) {
			if (is_array($heritage[$heritageID]["CONF"])) foreach($heritage[$heritageID]["CONF"] as $key => $val) $CONF[$key] = $val;
		}
		unset($heritage);
	}

?>