1
0

Try to set the loggedUser again

This commit is contained in:
Anthony Gourd
2016-12-02 00:37:43 +01:00
parent 0466b61bfe
commit e21c221bdd

@ -84,11 +84,13 @@ class AppController extends Controller
*/
public function beforeRender(Event $event)
{
// $this->set('loggedUser', $this->Auth->user());
if (!array_key_exists('_serialize', $this->viewVars) &&
in_array($this->response->type(), ['application/json', 'application/xml'])
) {
$this->set('_serialize', true);
}
if(isset($this->Auth))
$this->set('loggedUser', $this->Auth->user());
}
}