Skip to:

Opened 4 years ago

Closed 4 years ago

#7668 closed enhancement (fixed)

Remove loggedin_user duplicate check for messages_check_thread_access()

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


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 4 years ago.

Download all attachments as: .zip

Change History (5)

4 years ago

#1 @DJPaul
4 years ago

  • Milestone changed from 3.0 to Under Consideration

#2 @DJPaul
4 years ago

  • Milestone changed from Under Consideration to 3.0

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

#3 @espellcaste
4 years ago

@DJPaul Any update about this?

#4 @espellcaste
4 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.