MartyIX Posted November 8, 2013 Report Posted November 8, 2013 Hello, I try to implement a plugin that would integrate Blesta with our system and I would like to use callbacks: "Users.login" and "Users.logout" (http://docs.blesta.com/display/dev/Event+Handlers). I tried to register these two events as follows: class MyPlugin extends Plugin { ... public function getEvents() { return array( array( 'event' => "Appcontroller.preAction", 'callback' => array("this", "run") ), array( 'event' => "Users.login", 'callback' => array("this", "userWasLoggedIn"), ), array( 'event' => "Users.logout", 'callback' => array("this", "userWasLoggedOut") ) ); } // This method IS called. public function run($event) { echo "run -- method"; } // This method is NOT called. public function userWasLoggedIn($event) { var_dump("in", $event); throw new \Excepion("aaa"); } // This method is NOT called. public function userWasLoggedOut($event) { var_dump("out", $event); throw new \Excepion("sss"); } } The problem is that the methods userWasLoggedIn and userWasLoggedOut are not called when a user submits form located at https://blesta.domain.com/client/login/ http://docs.blesta.com/display/dev/Event+Handlers - I've just noticed that the events are available since version 3.1. Does it mean that the events will be available in the next release of Blesta? As far as I know the last released version is 3.0.5. Quote
Tyson Posted November 8, 2013 Report Posted November 8, 2013 http://docs.blesta.com/display/dev/Event+Handlers - I've just noticed that the events are available since version 3.1. Does it mean that the events will be available in the next release of Blesta? As far as I know the last released version is 3.0.5. Yes, v3.1 has not yet been released, so those events are not usable with any version of Blesta currently available. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.