XF 2.2 Search on Banned Emails

XF1 used to have a search on the banned email list. It's gone in XF2. It would be nice to have it back. You can't even export he list as XML, edit it, and reload as the import just piles on top of existing rather than replacing (and there's no practical way to delete all first).
 
Well, importing simply indicates "adding to"... not "comparing to existing and ignoring them".
Pretty sure I can export it as an XML

Screen Shot 2023-07-14 at 10.38.51 AM.webp

Edit/add to that in the format it saves in, and importing it should have no issues... of course it WILL over-write what you have.. but that is the very nature of an import... it's not a "merge".
 
What happens when you do that is you get both the original entry and the edited one because it just adds the entries you import (replacing identical ones but adding any changed or new ones, it can't resolve the difference).

There's no way to "edit" or even "find" an entry now. You have to manually scrolled through all the pages until you find it. THen you have to delete the existing one, and then add a new one.

Having a find like XF1 did, makes it a little easier.

The other option would be to have an option to erase them or have import erase them before importing.
 
What happens when you do that is you get both the original entry and the edited one because it just adds the entries you import (replacing identical ones but adding any changed or new ones, it can't resolve the difference).
I don't quite grasp your issue.. if the email is banned already, then there is no "original" version.. an import simply should overwrite ALL of the existing entries - realizing that is an IMPORT and not a MERGE... if you are stating that it does not... then you need to submit it as a bug.
 
Let me give you a scenario. Let's say you have "hatmail.com" in your banned list.

You realize this should be "hotmail.com"

The only way to change this is to scroll through the list and delete hatmail.com, then add a new entry for hotmail.com.

If you EXPORT as XML, change hatmail to hotmail, and then import the file, you will end up with both hotmail and hatmail in the list.
 
So, basically all you are asking about is the ability to search the existing banned list? I agree, this should be an integral feature/function.
Just one more thing that I spoke about on a closed thread that apparently is now dependent upon third party developers to provide... on step forward, 5 steps back.
 
Having a find like XF1 did, makes it a little easier.
XF1 didn't have a search for banned emails, at least not in the sense of the admin search function. You could of course just use the normal browser's "find on page" search though. Searchable admin content in XF1:

1689353000468.png
XF2 has more searchable content types than XF1 did (look in the XF\AdminSearch folder).

It's fairly easy to add a new content type to be searchable via admin search since it's really well abstracted out (I don't personally have a need for searching for banned emails, but if I did, we are talking less than 5 minutes of work):
  • Duplicate a basic admin search definition (for example Widget.php and replace it's definitions with stuff for banned emails [XF:BanEmail is the entity for example]).
  • Add that admin_search_class to a ban_email content type under XF Admin -> Development -> Content types
One thing that might be a little annoying is individual banned email definitions don't have a unique URL for them (like you can't click on one in the list to get detail about it). So you would end up just linking to the list of banned emails if it found a match. If someone really cared enough, they could make a new actionEmailsView method in the Banning admin controller so you could have a direct link to the one you wanted to look at (and possibly delete).
 
You're right, I was confused between Banned Emails and Banned Users. Banned Users used to have a search, it doesn't anymore.

I was looking for a filter entry like on the "List all users" or "Templates" or "Styles". or "Options" or any number of other pages.
 
Ya... would be nice if the banned user list (and I guess banned email list for you) had the filter option. Maybe that's what the suggestion should be distilled down to rather than making it part of the global admin search function?
 
Why can't you use the standard search admin.php?users/search and select the banned state?

1689358538682.webp

That returns a list of all banned accounts which are then filterable/searchable.

banned.webp
 
Top Bottom