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

XF 1.5 Admin User Search Criteria 'Has Avatar'

MRaburn

Active member
#1
Hey guys,

Been digging around for a while and maybe someone here knows the answer. I am pruning/moderating our user avatars. We have 170k users and basically only about 5% have avatars that need to be looked at and moderated. Currently this is very painful for obvious reasons.

Is there a way to pass a Criteria in the URL to only return users that DO have an Avatar?

I know there is this:

/admin.php?users/list&criteria[xxx][x]=x

I just do not know if there is one that will check the $user['avatar_date'] or $user['gravatar'] to see if Not Empty.

Thanks for any tips! Would save me about 30 hours of work.
 

James

Well-known member
#3
You could find the users via the avatar directory under /data/. Each avatar name is the user id of the user who has that avatar.

Not the best method but it works!
 

MRaburn

Active member
#4
Thanks for your input guys. I'll see what I can come up with, I saw an addon to add this Criteria to the Trophy system, see if I can cross if over to the User list.
 

Chris D

XenForo developer
Staff member
#5
Create a user group promotion using the "Does not have an avatar" criteria. Any users NOT in that specified group has an avatar.
 

MRaburn

Active member
#7
@Chris D it seems my user promotion is running at a limit of 20 user upgrades per cron run. Is there somewhere in the code or settings I can increase this? Will take a long time to run through 170k members. ;)
 

Chris D

XenForo developer
Staff member
#8
Yeah that will take forever - and it will only do active users, that way, too.

You will want to use the Rebuild User Group Promotions tool on the Admin CP > Tools > Rebuild Caches page... which will still take forever, but at least it does it in one go ;)
 

MRaburn

Active member
#9
Thanks Chris! This method seems will give me some good ideas by using promotions and upgrades to find certain classes of users and act on it.