Hi again!
I've started looking at it again since I thought I might had a lead.
In the code include/functions.php there's that part in set_default_user():
if (!defined('FORUM_QUIET_VISIT'))
{
// Update online list
if (!$forum_user['logged'])
{
$forum_user['logged'] = time();
$forum_user['csrf_token'] = random_key(40, false, true);
$forum_user['prev_url'] = get_current_url(255);
// REPLACE INTO avoids a user having two rows in the online table
$query = array(
'REPLACE' => 'user_id, ident, logged, csrf_token',
'INTO' => 'online',
'VALUES' => '1, \''.$forum_db->escape($remote_addr).'\', '.$forum_user['logged'].', \''.$forum_user['csrf_token'].'\'',
'UNIQUE' => 'user_id=1 AND ident=\''.$forum_db->escape($remote_addr).'\''
);
if ($forum_user['prev_url'] != null)
{
$query['REPLACE'] .= ', prev_url';
$query['VALUES'] .= ', \''.$forum_db->escape($forum_user['prev_url']).'\'';
}
($hook = get_hook('fn_set_default_user_qr_add_online_guest_user')) ? eval($hook) : null;
$forum_db->query_build($query) or error(__FILE__, __LINE__);
}
else
{
$query = array(
'UPDATE' => 'online',
'SET' => 'logged='.time(),
'WHERE' => 'ident=\''.$forum_db->escape($remote_addr).'\''
);
$current_url = get_current_url(255);
if ($current_url != null)
$query['SET'] .= ', prev_url=\''.$forum_db->escape($current_url).'\'';
($hook = get_hook('fn_set_default_user_qr_update_online_guest_user')) ? eval($hook) : null;
$forum_db->query_build($query) or error(__FILE__, __LINE__);
}
}
$forum_user['disp_topics'] = $forum_config['o_disp_topics_default'];
$forum_user['disp_posts'] = $forum_config['o_disp_posts_default'];
$forum_user['timezone'] = $forum_config['o_default_timezone'];
$forum_user['dst'] = $forum_config['o_default_dst'];
$forum_user['language'] = $forum_config['o_default_lang'];
$forum_user['style'] = $forum_config['o_default_style'];
$forum_user['is_guest'] = true;
$forum_user['is_admmod'] = false;
($hook = get_hook('fn_set_default_user_end')) ? eval($hook) : null;
___
Now I noticed that the first time someone logged in, it is getting called twice, first time it is called, it returns false, second time it is called it returns true.
But the second time someone logged in, it is called only once and return false.
From that point I'm lost again, if someone know the solution it would be very appreciated!
Thank you!