Skip to:

Opened 7 years ago

Closed 7 years ago

#7461 closed enhancement (fixed)

Allow BuddyPress to fetch 'illegal_user_logins' from WordPress core hook

Reported by: espellcaste's profile espellcaste Owned by: boonebgorges's profile boonebgorges
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Members Keywords: has-patch


Add an apply_filter to fetch also 'illegal_user_logins' from WordPress core filter hook instead of relying only on BuddyPress one.

People who are adding illegal user logins only on the WordPress hook and install BuddyPress later might not be aware the logins they thought were blocked, actually aren't.

Attachments (1)

7461.diff (3.7 KB) - added by espellcaste 7 years ago.

Download all attachments as: .zip

Change History (8)

#2 @espellcaste
7 years ago

  • Milestone changed from Awaiting Review to 3.0

#3 @boonebgorges
7 years ago

  • Keywords needs-patch added

Here's a persistent GitHub link to the filter in question:

@espellcaste Any chance you could create a patch?

As a side note, it's odd that WordPress doesn't have a helper function for this. It calls apply_filters( 'illegal_user_logins' ) about six separate times. If WP had a function with a filterable return value, our own implementation could filter it.

#4 @espellcaste
7 years ago

  • Component changed from Core to Members
  • Keywords has-patch added; needs-patch removed
  • Type changed from defect (bug) to enhancement

@boonebgorges Thanks for taking a look at this. :)

How did you get a persistent url from a file on Github? That got me curious!

I'm sending a patch as requested with proper unit tests and a minor change in two files to comply with WordPress Coding Standards.

And yes, I believe it is odd. But as you said, it is only used six times.

7 years ago

#5 @boonebgorges
7 years ago

How did you get a persistent url from a file on Github? That got me curious!

Press y :-D

Thanks for the updated patch! The unrelated Coding Standards changes are welcome, but will be considered separately.

#7 @boonebgorges
7 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 11747:

Members: Run BP's illegal user names through WP filter.

This ensures that user names added to the blacklist via the
'illegal_user_logins' filter are also blacklisted during BP registration.

Props espellcaste.
Fixes #7461.

Note: See TracTickets for help on using tickets.