1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to see groups last login

Discussion in 'XenForo Questions and Support' started by abnvet, May 6, 2013.

  1. abnvet

    abnvet Active Member

    Hi, I would like to be able to run a query and it show the last login time of members in a group and how many posts and etc...

    Basically, my community has been running itself for quite some time as I have been away for training. I have a group thats listed as "Clan Members" and the overall goal is for me to be able to at a glance see what members in this group are active or inactive so that I can remove dead weight. There are like 40 members in this group so going through each one to see last login time and last post would be tedious. Any help or suggestions would be greatly appreciated.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    SELECT username, message_count, FROM_UNIXTIME(last_activity, '%Y-%m-%d') AS date
    FROM xf_user
    WHERE user_group_id = 2 OR FIND_IN_SET(2, secondary_group_ids)
    ORDER BY last_activity
    That will show you all members of group 2, their usernames, post count, and last active date.
  3. abnvet

    abnvet Active Member

    thanks jake
  4. oloman

    oloman Active Member


    I'd like to do the same thing. I'd like to select the lastvisit after a date.
    For example, lastvisit after January 2010

    SELECT username, FROM_UNIXTIME(lastvisit, '%Y-%m-%d') AS date
    FROM xf_user
    WHERE date>2010-01-01;

    It works fine?

    Thanx a lot

Share This Page