Skip to:
Content

BuddyPress.org

Changes between Initial Version and Version 1 of Ticket #7658, comment 11


Ignore:
Timestamp:
05/07/2024 04:52:43 PM (9 months ago)
Author:
dcavins
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7658, comment 11

    initial v1  
    99This is true for BP 12 and BP 12 + BP Classic, in WP 6.3+.
    1010
    11 I've come up with a pretty simple outline of a solution that I'll attach a patch for that introduces a new class `BP_LoggedIn_User` which uses a magic `__get()` to fetch property values from WP as needed. I think it's what John was hinting at above. Anyway, it seems to work, though I'm not currently able to run our unit tests, so don't know what that will uncover.
     11I've come up with a pretty simple outline of a solution that I'll attach a patch for that introduces a new class `BP_LoggedIn_User` which uses a magic `__get()` to fetch property values from WP as needed. I think it's what John was hinting at above. Anyway, it seems to work, and running the unit tests fails on two tests that look like they should fail:
     12
     13{{{
     141) BP_Tests_BP_Groups_Group_TestCases::test_is_member_property
     15Failed asserting that 354 is false.
     16
     17/var/www/html/wp-content/plugins/buddypress/tests/phpunit/testcases/groups/class-bp-groups-group.php:1762
     18
     192) BP_Tests_BP_Groups_Group_TestCases::test_is_invited_property
     20Failed asserting that 40 is false.
     21
     22/var/www/html/wp-content/plugins/buddypress/tests/phpunit/testcases/groups/class-bp-groups-group.php:1788.
     23}}}