Uwe
Uwe
Offline
0
I need to run a statistic for user logins but don't want the administrator logins to show in the results. Therefore I would like to exclude (!) certain user ids from the statistics. How can I do this?

Thanks,
Uwe
Responses (4)
  • Accepted Answer

    Friday, June 22 2012, 05:48 PM - #Permalink
    0
    well to allow this you would need actually a bit of code modification.. cannot be achieved just with the configuration..!
    The reply is currently minimized Show
  • Accepted Answer

    Uwe
    Uwe
    Offline
    Saturday, June 23 2012, 04:49 AM - #Permalink
    0
    OK - but which Code needs To be modificated? And how? Can you provide us with solution please?

    I am sure that no administrator wants to see his own traffic in the statistics. Therefore there should be an option to filter that out anyway.

    Tanks!
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, June 23 2012, 09:22 AM - #Permalink
    0
    Yes I see what you mean but it's not that easy...
    are you a PHP coder?
    if you are: basically you need to go to the /plugins/contentstats/com_user.php and in line 64 approx you have to retrieve the user like this:

    $user =& JFactory::getUser();

    you will have the user id in $user->id, and you basically need to check if the ID is from an admin, and if it is, set

    $data['register'] = false ;

    do you know what I mean?

    if you're not a coder you won't know what I'm talking about...!
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 16 2015, 12:45 PM - #Permalink
    0
    Hi there,

    We're trying to do something similar. I have some basic PHP experience but I'm not quite sure what the registerStatistic function does or how your suggestion works.

    We have a list of user IDs to exclude. Would I need to create a foreach loop and then loop through the list of IDs and running a snippet of code that removes them from the users that are registered?

    Any help would be great!

    Thanks,

    Tim
    The reply is currently minimized Show
Your Reply