public function onBeforeLoginPerson(AnEvent $event)
    {
        $credentials = $event->credentials;

        if (! $this->_canPerform()) {
            return false;
        }

        if (isset($credentials['username'])) {
            $this->_createToken($credentials['username']);
        }
    }
public function onBeforeLoginPerson(AnEvent $event)
    {
        $credentials = $event->credentials;

        if (! $this->_canPerform()) {
            return false;
        }

        if (isset($credentials['username'])) {
            $this->_createToken($credentials['username']);
        }
    }
public function onBeforeLoginPerson ( AnEvent $ event ) { $ credentials = $ event -> credentials ; if ( ! $ this -> _canPerform ( ) ) { return false ; } if ( isset ( $ credentials [ 'username' ] ) ) { $ this -> _createToken ( $ credentials [ 'username' ] ) ; } }
This method should handle any login logic and report back to the subject.

@param 	array 	holds the user data
@param 	array    extra options

@return bool True on success
This method should handle any login logic and report back to the subject .