after_user_login($userID)- This hook function is called after a user logs in.


after_user_logout($userID) - This hook function is called after a user logs out.


$userID (int) - the numeric OR user ID# of the user logging in or out.


example:

<?php

function after_user_login($userID){

// adds a log entry into the OR activity log when a user logs in.

global $conn, $config, $misc;

  $sql = "SELECT userdb_user_first_name, userdb_user_last_name

          FROM ".$config['table_prefix']."userdb

          WHERE userdb_id = '".$userID."'";

  $recordSet = $conn->Execute($sql);

  $fname = $recordSet->fields['userdb_user_first_name'];

  $lname = $recordSet->fields['userdb_user_last_name'];

  $misc->log_action('User ID#'.$userID. ' '. $fname .' '.  $lname .' Logged in');

return null;

}        

?>