calinrada / PhalconUserPlugin

185 stars 68 forks source link

how to use it? Any demo? #28

Closed mikguo closed 9 years ago

mikguo commented 9 years ago

when I insert

        $di['dispatcher'] = function() use ($di) {
            $eventsManager = $di->getShared('eventsManager');
            $security = new \Phalcon\UserPlugin\Plugin\Security($di);
            $eventsManager->attach('dispatch', $security);
            $dispatcher = new \Phalcon\Mvc\Dispatcher();
            $dispatcher->setEventsManager($eventsManager);
            return $dispatcher;
        };

to my project, it's report fatal error: Call to a member function hasRememberMe() on a non-object. I need setAuth first? Could you uploads any demo how to use it? Thanks.