Opened 3 years ago

Last modified 2 years ago

#15508 new enhancement

Use !is_user_logged_in instead of !$user->ID

Reported by: Eteq Owned by:
Priority: normal Milestone: Future Release
Component: General Version: 3.0.1
Severity: major Keywords: has-patch needs-testing reporter-feedback
Cc: johnbillion@…

Description

The subject line pretty much says all. I'm kind of integrating a user system of my own to allow comments into wordpress posts as if logged in amongst other few minor changes like session sharing. I've managed to do so as a plugin, until I got stuck with this.

The fact that many places in the wordpress code checks for the user id, instead of using the is_user_looged_in renders the purpose of that function useless for plugins.

Attachments (1)

15508.diff (4.0 KB) - added by garyc40 2 years ago.
there's a patch for that

Download all attachments as: .zip

Change History (5)

  • Keywords needs-patch added; user login plugin removed
  • Milestone changed from Awaiting Review to Future Release
  • Cc johnbillion@… added

I'll volunteer to patch this one up unless Eteq or someone else wants to.

  • Keywords reporter-feedback added

Any examples? I've found only one instance in wp-includes/capabilities.php:

if ( ! $user || ! $user->ID )
	return false;

garyc402 years ago

there's a patch for that

  • Keywords has-patch needs-testing added; needs-patch removed
Note: See TracTickets for help on using tickets.