• 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?

Okenyon

Active member
#1
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?
 

wang

Well-known member
#2
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?
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:

Okenyon

Active member
#3
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?
 

Okenyon

Active member
#5
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
        ');
    }

Thank you, where do I locate "Model" folder?