Is the "onLogout" event getting called

18 years 4 months ago #2497 by geeffland
Is the "onLogout" event getting called was created by geeffland
Is the "onLogout" event getting called when you log out? I am helping martijn with the phpbb plugin and it does not seem to be ending the session upon logout...

here is my pertinent sections of code

$_PLUGINS->registerFunction( 'onLogout' , 'endphpbbsession' );

function endphpbbsession (&$row) {
global $database;
//search for all $session_id in phpbb_sessions where $session_user_id = $user_id
$database->setQuery( "SELECT session_id FROM phpbb_sessions WHERE session_user_id='".$row->id."'" );
$items = $database->loadObjectList();
if(!count($items)>0) {
$return = "No Sessions in Progress";
return $return;
}
foreach($items AS $item) {
// end each session
$phppBBsessionID = session_end($item->session_id, $row->id);
}
}

Any ideas?
Greg

CB3PD Developer - CB Connector (formerly phpBB Connector) plugin

Please Log in to join the conversation.

18 years 4 months ago #2501 by geeffland
Replied by geeffland on topic Re:Is the "onLogout" event getting called
Just checked the CB code...

They have onBeforeLogout and OnAfterLogout versus the onLogout event that is listed in the PDF manual

CB3PD Developer - CB Connector (formerly phpBB Connector) plugin

Please Log in to join the conversation.

18 years 4 months ago #2584 by beat
Replied by beat on topic Re:Is the
geeffland wrote:

Just checked the CB code...

They have onBeforeLogout and OnAfterLogout versus the onLogout event that is listed in the PDF manual


Corrected in next release manual. Sorry for that. Correct one is:

//Logout User event
function onBeforeLogout ($row)
function onAfterLogout ($row, true)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.229 seconds

Facebook Twitter LinkedIn