php - Solved. How are cmsmadesimple events sent? -


Need help with cmsmadesimple events I am trying to handle the module frontendusers event online. This module initiates this event in method.install.php:

  $ this-> CreateEvent ('OnLogin');  

method.instal.php I register an online handler in my Ceiling module:

  $ this-> AddEventHandler ('FrontEndUsers ',' Onologin ');  

So, let's start. FrontEndUser sends this event along with action.do_login.php:

  $ parms = array (); $ Params ['id'] = $ this- & gt; Login INId (); $ Parameters ['username'] = $ parameter ['feu_input_username']; $ Parameters ['IP'] = CG_Utiles :: join-ARI_IP (); $ This- & gt; SendEvent ('onologin', $ parameter); $ This- & gt; _SendNotificationEmail ('OnLogin', $ parms);  

I do the CVCRM module:

  Public event DoEvent ($ originator, $ eventname, and $ params) {if ($ Catalyst == 'Frontend User' & amp; $ eventname == 'Onologin' var_dump ($ params); Die ("feulogin"); }}  

When you login further, the script ends up as expected, but when trying to debug $ params, how the event sends the confusion, because here Also commented:

  // $ this-> SendEvent ('onologin', $ parameter);  

Handles the DoEvent () event (the scripts are exited with the message).

No other code was found in FrontEndUsers where the online event is sent, so please help me figure it out.

resolves it manually and sends an event from FrontEndUsers module / FrontEndUsers / lib / class.FrontEndUsersManipulator.php: ($ User name, $ password, $ groups = '', $ md5pw = false, $ force_logout = false) {$ Module-> SendEvent ('OnLogin', array (' Id = '> & gt; $ uid,' username '= & gt; $ user name,' ip '= & gt; $ ip)); }


Comments