[wp-trac] [WordPress Trac] #59000: Add a check for wp_get_current_user to current_user_can
WordPress Trac
noreply at wordpress.org
Mon Sep 11 07:37:43 UTC 2023
#59000: Add a check for wp_get_current_user to current_user_can
-------------------------------------------------+-------------------------
Reporter: scruffian | Owner: azaozz
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.3.2
Component: Users | Version: 6.3
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests needs- | Focuses:
testing fixed-major |
-------------------------------------------------+-------------------------
Comment (by okat):
Thank you for applying the patch to trunk, @azaozz!
>However I'd like to really "get to the bottom of it" and try to remedy
the underlying problem if at all possible. Alternatively can add some more
docs to try to prevent similar usage in the future.
I submitted the PR trying to prevent early function calls by adding a
notice. Could you take a look at https://github.com/WordPress/wordpress-
develop/pull/5182? Or I'd appreciate any other suggestions or comments
🙏🙂
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59000#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list