Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Is the "onLogout" event getting called

  • geeffland
  • geeffland
  • OFFLINE
  • Posts: 199
  • Thanks: 0
  • Karma: 233
19 years 6 days 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 or Create an account to join the conversation.

  • geeffland
  • geeffland
  • OFFLINE
  • Posts: 199
  • Thanks: 0
  • Karma: 233
19 years 6 days 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 or Create an account to join the conversation.

  • beat
  • beat
  • OFFLINE
  • Posts: 2174
  • Thanks: 463
  • Karma: 352
19 years 4 days 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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum