Skip to:
Content

BuddyPress.org

Opened 7 years ago

Closed 7 years ago

#7668 closed enhancement (fixed)

Remove loggedin_user duplicate check for messages_check_thread_access()

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

Description

On messages_check_thread_access(), the function is using a check for the logged in user that already happens on the BP_Messages_Thread::check_access.

I don't see why, so I'm suggesting to remove it.

Attachments (1)

7668.diff (595 bytes) - added by espellcaste 7 years ago.

Download all attachments as: .zip

Change History (5)

@espellcaste
7 years ago

#1 @DJPaul
7 years ago

  • Milestone changed from 3.0 to Under Consideration

#2 @DJPaul
7 years ago

  • Milestone changed from Under Consideration to 3.0

Yes, this looks ok. Ping me or Boone on Slack sometime.

#3 @espellcaste
7 years ago

@DJPaul Any update about this?

#4 @espellcaste
7 years ago

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

In 11844:

Remove redundant handling of optional $user_id parameter from messages_check_thread_access()

On messages_check_thread_access(), we are checking if the $user_id parameter is set. The same check is being done on BP_Messages_Thread::check_access().

So we are keeping only the low level check, instead of both.

Props DjPaul.

Fixes #7668

Note: See TracTickets for help on using tickets.