Hide admin deactivated accounts from Inactive Users page

A perfect place for code snippets to small to be a MOD or a library.
Or for examples on how to use our libraries.
Post Reply
Derky
Supporter
Supporter
Posts: 27
Joined: 21 Aug 2006, 19:23
Real name: Derk
Location: The Netherlands
Contact:

Hide admin deactivated accounts from Inactive Users page

Post by Derky »

The Inactive Users page and the Main page of the ACP also show the "deactivated by administrator" accounts. I try to to keep this list empty by reminding/deleting (new) inactive users, therefore I don't want the manual deactivated accounts listed there. To remove them from this list:

Open: includes/functions_admin.php

Find:

Code: Select all

$sql = 'SELECT COUNT(user_id) AS user_count
      FROM ' . USERS_TABLE . '
      WHERE user_type = ' . USER_INACTIVE .
After Add:

Code: Select all

      ' AND user_inactive_reason <> ' . INACTIVE_MANUAL . 


Find:

Code: Select all

$sql = 'SELECT *
      FROM ' . USERS_TABLE . '
      WHERE user_type = ' . USER_INACTIVE .
After Add:

Code: Select all

      ' AND user_inactive_reason <> ' . INACTIVE_MANUAL . 
ImagephpBB3 Styles • phpBB3 Styles Demo • phpBB3 Styles Database
User avatar
tumba25
Supporter
Supporter
Posts: 1058
Joined: 24 Oct 2007, 13:10
Real name: Jari Kanerva
Location: Kokkola, Finland.
Contact:

Re: Hide admin deactivated accounts from Inactive Users page

Post by tumba25 »

Great snippet, thanks.
User avatar
Ooopsie
Supporter
Supporter
Posts: 1213
Joined: 19 Aug 2010, 16:34
Location: Index, WA
Contact:

Re: Hide admin deactivated accounts from Inactive Users page

Post by Ooopsie »

Very nice snippet. Thanks for sharing.
Image
Oopsie
_____
Be who you are and say what you feel.
Those who mind don't matter.
Those who matter don't mind.
- Dr. Seuss

_____
And be kinder than necessary, for everyone
you meet is fighting some kind of battle.
Post Reply