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

XF 1.5 Invalid members?

Discussion in 'XenForo Questions and Support' started by Okenyon, Dec 21, 2015.

  1. Okenyon

    Okenyon Active Member

    I've just setup the bounce featured to move those without verified emails to invalid.

    Is there a setting to STILL show them on the user count as they have all disappeared from my user count?
     
  2. wang

    wang Well-Known Member

    The total user count applies only to users whose state is valid and not banned.

    If you want to edit that behaviour, you will have to edit the User.php file inside the Model folder. Change this code.

    PHP:
    /**
        * Gets the count of total users.
        *
        * @return integer
        */
        
    public function countTotalUsers()
        {
            return 
    $this->_getDb()->fetchOne('
                SELECT COUNT(*)
                FROM xf_user
                WHERE user_state = \'valid\'
                    AND is_banned = 0
            '
    );
        }
    to this.

    PHP:
    /**
        * Gets the count of total users.
        *
        * @return integer
        */
        
    public function countTotalUsers()
        {
            return 
    $this->_getDb()->fetchOne('
                SELECT COUNT(*)
                FROM xf_user
                WHERE  is_banned = 0
            '
    );
        }
     
    Last edited: Dec 21, 2015
  3. Okenyon

    Okenyon Active Member

    Ok however these people are not banned, they are just not using a verified email. So can we overwrite this somehow so all members show?
     
  4. wang

    wang Well-Known Member

    Yes, you must change manually a file. I added the code to do that in my previous post.
     
  5. Okenyon

    Okenyon Active Member


    Thank you, where do I locate "Model" folder?
     
    wang likes this.
  6. wang

    wang Well-Known Member

    You can find it by going to your forum folder/library/XenForo.
     
    Okenyon likes this.
  7. Okenyon

    Okenyon Active Member

    Thank you.
     
    wang likes this.
  8. wang

    wang Well-Known Member

    You are welcome sir.
     
  9. daudet

    daudet Member

    I believe this is handled differently in Version 1.4? Can you tell me how to do this in 1.4?
     
  10. wang

    wang Well-Known Member

    It is the same for 1.4. too.
     

Share This Page