Skip to:
Content

BuddyPress.org

Opened 2 years ago

Closed 20 months ago

#7461 closed enhancement (fixed)

Allow BuddyPress to fetch 'illegal_user_logins' from WordPress core hook

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

Description

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 23 months ago.

Download all attachments as: .zip

Change History (8)

#2 @espellcaste
2 years ago

  • Milestone changed from Awaiting Review to 3.0

#3 @boonebgorges
23 months ago

  • Keywords needs-patch added

Here's a persistent GitHub link to the filter in question: https://github.com/buddypress/BuddyPress/blob/07cac031fb1349f5636604474eaf355176472dcf/src/bp-members/bp-members-functions.php#L1583

@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
23 months 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.

@espellcaste
23 months ago

#5 @boonebgorges
23 months 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
20 months 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.