Opened 16 years ago
Closed 13 years ago
#15508 closed enhancement (fixed)
Use !is_user_logged_in instead of !$user->ID
| Reported by: | Eteq | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.7 |
| Component: | Comments | Version: | 3.0.1 |
| Severity: | normal | Keywords: | has-patch 2nd-opinion |
| Cc: | Focuses: |
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 (3)
Change History (12)
#1
@
16 years ago
- Keywords needs-patch added; user login plugin removed
- Milestone Awaiting Review → Future Release
#3
@
16 years ago
- Keywords reporter-feedback added
Any examples? I've found only one instance in wp-includes/capabilities.php:
if ( ! $user || ! $user->ID ) return false;
#6
@
13 years ago
- Keywords reporter-feedback removed
- Milestone Future Release → 3.7
- Severity major → normal
#7
@
13 years ago
- Keywords 2nd-opinion added; needs-testing removed
15508.patch includes the changes from 15508.diff for wp-includes/comment-template.php.
Not sure if we have to change wp-comments-post.php too, since we already have $user->exists() here. I have included it in 15508.2.patch.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I'll volunteer to patch this one up unless Eteq or someone else wants to.