src/Auth/FootprintAwareTrait.php
public function footprint(Event $event)
    {
        if (!$this->_listener) {
            $this->_listener = new FootprintListener($this->_getCurrentUser());
        }

        if ($event->getName() === 'Auth.afterIdentify') {
            $this->_listener->setUser($this->_getCurrentUser($event->getData(0)));

            return;
        }

        $event->getSubject()->getEventManager()->on($this->_listener);
    }
public function footprint(Event $event)
    {
        if (!$this->_listener) {
            $this->_listener = new FootprintListener($this->_getCurrentUser());
        }

        if ($event->getName() === 'Auth.afterIdentify') {
            $this->_listener->setUser($this->_getCurrentUser($event->getData(0)));

            return;
        }

        $event->getSubject()->getEventManager()->on($this->_listener);
    }
public function footprint ( Event $ event ) { if ( ! $ this -> _listener ) { $ this -> _listener = new FootprintListener ( $ this -> _getCurrentUser ( ) ) ; } if ( $ event -> getName ( ) === 'Auth.afterIdentify' ) { $ this -> _listener -> setUser ( $ this -> _getCurrentUser ( $ event -> getData ( 0 ) ) ) ; return ; } $ event -> getSubject ( ) -> getEventManager ( ) -> on ( $ this -> _listener ) ; }
Try and attach footprint listener to models.

It also passing the user record to footprint listener after user is
identified by AuthComponent.

@param \Cake\Event\Event $event Event.
@return void
Try and attach footprint listener to models .