Login Event Listener
Jamroom Developers
Yes - you are right - if one is brave enough to dig into the source, we do see there are listeners all over the place. DocBlocks sound great: Our team tries to avoid 'locally installed IDEs', instead we have moved into the Cloud9 IDE, not sure how to get DocBlocks from Cloud9 IDE.
-----
We are Beginners at JR Development - so we will post this code below, to help others like us:
-----
The code below is close, but not quite working, seems not firing the listener code:
Any ideas to fix? Please Advise...
<?php
defined('APP_DIR') or exit();
function sdContestMWUser_meta(){
$_tmp = array(
'name' => 'ContestMWUser',
'url' => 'ContestMWUser',
'version' => '1.0.0',
'developer' => 'SoftDesigns',
'description' => 'Verify Contest User',
'category' => 'tools'
);
return $_tmp;
}
function sdContestMWUser_init(){
jrCore_register_event_listener('jrUser','login_success',
'sdContestMWUser_login_success_listener');
}
function sdContestMWUser_login_success_listener($_data,$_user,$_conf,$_args,$event)
{
$_Log1 = "sdsdContestMWUser";
$_Log2 = "sdContestMWUser_login_success_listener";
$_Log3 = $_args;
fdebug($_Log2, $_args);
jrCore_logger($_Log1, $_Log2, $_Log3);
return $_data;
}
updated by @softdesigns: 01/10/17 08:18:03PM