I know there’s probably a much more elegant way to do this with hooks within functions.php, but I’m wondering why I’m having trouble just invoking aal_insert_log itself on the page.php template I’m working on? I would expect this to snippet to add a new “login” line whose label would be the name of the page.
if (function_exists('aal_insert_log')) {
aal_insert_log( array(
'action' => 'logged_in',
'object_type' => 'User',
'object_subtype' => get_the_title(),
'user_id' => $user_ID,
'object_id' => $user_ID,
'object_name' => $user_info->user_login,
) );
}
It seems the function does exist, but calling it directly doesn’t cause anything to happen. Thanks for any help.