http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#accessing-the-logged-in-user訪問已登錄的用戶AuthComponent :: user()
有人可以幫助我理解這一點。
AuthComponent::user()
方法只返回關於用戶的一些基本信息,而不是實際的用戶對象本身。
從軌道的到來,我習慣了一個滿載current_user
對象
如果我想類似的東西,我應該做一個
$this->User->id = AuthComponent::user('id')
和使用?或者是已經有一個我可以使用的內置方法。
在此先感謝。