[TYPO3] TCA and uid of Backend User

Stefan Bothner | [m]zentrale stefan at m-zentrale.de
Wed Apr 19 13:21:57 CEST 2006


Hi folks,

problem also solved. i extended the tca.php
by following funktion:

function returnMethod(){
	$GLOBALS["TYPO3_DB"]->debugOutput = true;
	
	$res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery("*","be_users AS A,
be_sessions AS B","B.ses_id = '".$GLOBALS["_COOKIE"]["be_typo_user"]."' AND
A.uid = B.ses_userid");
	
	if($GLOBALS['TYPO3_DB']->sql_num_rows($res)){	
		$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
		return $row["tx_mzextendbeusers_method"];
	}else{
		
	}
}

and i extended my fild-config by following code:

"config" => Array (
				"type" => "select",	
				"foreign_table" => "tx_mzAKDBVerfahren",

				"foreign_table_where" => " AND
tx_mzAKDBVerfahren.uid = ".returnMethod()." ORDER BY
tx_mzAKDBVerfahren.uid",	
				"size" => 6,	
				"minitems" => 0,
				"maxitems" => 99,
			)

Kind regards

Stefan Bothner

> -----Original Message-----
> From: typo3-english-bounces at lists.netfielders.de 
> [mailto:typo3-english-bounces at lists.netfielders.de] On Behalf 
> Of Stefan Bothner | [m]zentrale
> Sent: Tuesday, April 18, 2006 2:02 PM
> To: typo3-english at lists.netfielders.de
> Subject: [TYPO3] TCA and uid of Backend User
> 
> Hi folks,
> 
> is there any poss. to get the uid of an logged in backenduser 
> within the tca.php. Is there any marker reserved?
> 
> Thanks for help
> 
> Kind regards
> 
> Stefan Bothner
> 
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> 




More information about the TYPO3-english mailing list