Event discrepancy

18 years 3 months ago #3262 by geeffland
Event discrepancy was created by geeffland
Was documenting the events from the comprofiler and admin.comprofiler files when I noticed that onUserActive has different return values in comprofiler than it does in admin.comprofiler...

In comprofiler it returns $user[0] which comes from the comprofiler table and in admin.comprofiler it returns $row which comes from the users table... Is this they way it is supposed to be??? If so it makes it hard on 3PD developers because we may not know what is getting passed to us... Here are all of the triggers I found in those 2 files (for your info)...

Comprofiler Events

$_PLUGINS->trigger( 'onBeforeUserUpdate', array(&$row,&$rowExtras));
$_PLUGINS->trigger( 'onAfterUserUpdate', array($row, $rowExtras, true));
$_PLUGINS->trigger( 'onNewPassword', array($user_id,$newpass));
$_PLUGINS->trigger( 'onBeforeUserRegistration', array(&$row,&$rowExtras));
$_PLUGINS->trigger( 'onAfterUserRegistration', array($row, $rowExtras, true));
$_PLUGINS->trigger( 'onUserActive', array($user[0],true)); // Note $user is the record from comprofiler
$_PLUGINS->trigger( 'onBeforeLogin', array($username, $passwd2)); // Note passwd2 is not encrypted
$_PLUGINS->trigger( 'onAfterLogin', array($row, true));
$_PLUGINS->trigger( 'onBeforeLogout', array($row));
$_PLUGINS->trigger( 'onAfterLogout', array($row, true));
$_PLUGINS->trigger( 'onBeforeUserConfirm', array($user[0]));
$_PLUGINS->trigger( 'onAfterUserConfirm', array($user[0],true));
$_PLUGINS->trigger( 'onUserActive', array($user[0],true));
$_PLUGINS->trigger( 'onBeforeUserApproval', array($row,true));
$_PLUGINS->trigger( 'onAfterUserApproval', array($row,true,true));
$_PLUGINS->trigger( 'onBeforeUserApproval', array($row,false)); // rejectUser
$_PLUGINS->trigger( 'onAfterUserApproval', array($row,false,true)); //rejectUser

Admin Comprofiler Events

$_PLUGINS->trigger( 'onBeforeNewUser', array(&$row,&$rowExtras, false));
$_PLUGINS->trigger( 'onAfterNewUser', array($row, $rowExtras, false, true));
$_PLUGINS->trigger( 'onUserActive', array($row,true));
$_PLUGINS->trigger( 'onBeforeUpdateUser', array(&$row,&$rowExtras));
$_PLUGINS->trigger( 'onAfterUpdateUser', array($row, $rowExtras, true));
$_PLUGINS->trigger( 'onUserActive', array($row,true));
$_PLUGINS->trigger( 'onBeforeDeleteUser', array($user[0]));
$_PLUGINS->trigger( 'onAfterDeleteUser', array($user[0],true));
$_PLUGINS->trigger('onBeforeUserApproval',array($row,$approved));
$_PLUGINS->trigger('onAfterUserApproval',array($row,$approved,true));
$_PLUGINS->trigger( 'onUserActive', array($row,true));


CB3PD Developer - CB Connector (formerly phpBB Connector) plugin

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.125 seconds

Facebook Twitter LinkedIn