14 | | I checked the wp repo and I have to admit that I didn't find even 1 plugin where this could cause a bug because they all check if the $user is a WP_User first (https://wpdirectory.net/search/01F2Q4CJTZFV747PPKFMQR5X53). This leads us to the second part of my comment… |
| 14 | |
| 15 | We should keep the possibility of a return false like before: |
| 16 | {{{#!php |
| 17 | <?php |
| 18 | if ( ! $user || ! $user->exists() ) { |
| 19 | return false; |
| 20 | } |
| 21 | }}} |
| 22 | Because a "false user" is not the same as a "logged-out user". So a fake one does not exists. |
| 23 | Still I agree that a current_user_can( 'exists' ) should always return true, because I mean… I'm the current, so I exist. |
| 24 | |
| 25 | Then I've checked the wp repo and I have to admit that I didn't find even 1 plugin where this could cause a bug because they all check if the $user is a WP_User first (https://wpdirectory.net/search/01F2Q4CJTZFV747PPKFMQR5X53). This leads us to the second part of my comment… |