FrontendUser::getCookie() 

\nn\t3::FrontendUser()->getCookie(); 

Gets the current fe_typo_user cookie.

$cookie = \nn\t3::FrontendUser()->getCookie();
Copied!

| @return string

Source Code 

public function getCookie()
{
	$cookieName = $this->getCookieName();
	if ($request = &$GLOBALS['TYPO3_REQUEST']) {
		$cookieParams = $request->getCookieParams();
		if ($value = $cookieParams[$cookieName] ?? false) {
			return $value;
		}
	}
	if ($cookie = $_COOKIE[$cookieName] ?? false) {
		return $cookie;
	}
	if ($cookies = \nn\t3::Cookies()->getAll()) {
		return $cookies[$cookieName]['value'] ?? '';
	}
	return '';
}
Copied!