I add a new stored procedure to check the user ID instead of the IP and change the code in active_users_inc.asp to this:
If lngActiveUsersID <> 2 Then
If strDatabaseType = "SQLServer" Then
strSQL = "EXECUTE wwfSpActiveUsersWhereIDis @lngActiveUsersID = '" & lngActiveUsersID & "'"
Else
strSQL = "SELECT " & strDbTable & "ActiveUser.* From " & strDbTable & "ActiveUser WHERE Author_ID='" & lngActiveUsersID & "';"
End If
Else
If strDatabaseType = "SQLServer" Then
strSQL = "EXECUTE " & strDbProc & "ActiveUsersWhereIPis @strIPAddress = '" & strIPAddress & "'"
Else
strSQL = "SELECT " & strDbTable & "ActiveUser.* From " & strDbTable & "ActiveUser WHERE IP='" & strIPAddress & "';"
End If
End If
That way if the user is a guest it checks the IP and if the user is not a guest it checks the user ID, it should make it more accurate and shouldn't affect performance, what you think?
Edited by fernan82