How are cmsmadesimple events sent?
Posted: Wed Feb 19, 2014 3:09 pm
Hi,
I need help with cmsmadesimple events. I'm trying handle modules FrontEndUsers event OnLogin. This module initiates this event in method.install.php:
In my Civicrm module method.instal.php I register OnLogin handler:
So, lets start. FrontEndUser sends this event in action.do_login.php with:
I do in CiviCRM module:
When you do front login, script is terminated as expected, but when trying to debug $params, got confused how event is send, because even commented out:
DoEvent()handles event as well (exits script with message).
Couldnt find any more code in FrontEndUsers where OnLogin event is sent, so please help me find out that.
I need help with cmsmadesimple events. I'm trying handle modules FrontEndUsers event OnLogin. This module initiates this event in method.install.php:
Code: Select all
$this->CreateEvent( 'OnLogin' );Code: Select all
$this->AddEventHandler( 'FrontEndUsers', 'OnLogin' );Code: Select all
$parms = array();
$parms['id'] = $this->LoggedInId();
$parms['username'] = $params['feu_input_username'];
$parms['ip'] = cge_utils::get_real_ip();
$this->SendEvent( 'OnLogin', $parms );
$this->_SendNotificationEmail('OnLogin',$parms);Code: Select all
public function DoEvent($originator, $eventname, &$params)
{
if ($originator == 'FrontEndUsers' && $eventname == 'OnLogin')
var_dump($params);
die("feulogin");
}
}Code: Select all
//$this->SendEvent( 'OnLogin', $parms ); Couldnt find any more code in FrontEndUsers where OnLogin event is sent, so please help me find out that.