2
Nette 구성 요소 (SomethingControl.php)에 로그인 한 사용자의 이름을 얻는 방법을 묻습니다. 구성 요소의 Nette getUser
$identity = $this->getUser()->getIdentity();
if ($identity) $this->template->username = $identity->getData()['username'];
그래서 나는이 시도했습니다 :
$this->template->username = $this->user
을하지만 그 중 하나가 작동하지 않습니다 분명히 난 그냥 이렇게 캔트.
nette 2.3에서 작동합니까? – Muhaha
내가 아는 한 - 그렇습니다. – mrtnzlml
에러를 반환합니다. 정의되지 않은 함수 App \ MainModule \ Components \ bdump()를 호출하십시오. – Muhaha