Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom profile fields on BP multisite

Viewing 6 replies - 1 through 6 (of 6 total)

  • CodeMonkeyBanana
    Participant

    @codemonkeybanana

    (Edit link is not working for some reason so double posting)

    Another issue I have is how do I update existing sites to use the new tables?


    CodeMonkeyBanana
    Participant

    @codemonkeybanana

    I’ve been staring at the code for a while and it’s starting to make sense.

    I’m not great with databases but looking at the function I gather it changes a few fields into primary keys that point to the data table so fields can be individual.

    It runs the table modification code on the dbdelta_create_queries hook.

    The wordpress codex seems to say that this action will happen anytime a database or a table is created.

    Am I right in saying that this only ever has to be run once? Can I just run it once on admin init then remove it and add the modify_bp_global_xprofiles_tablenames at runtime or have I misunderstood it?


    CodeMonkeyBanana
    Participant

    @codemonkeybanana

    I ran the code but I cannot work out if it has worked because “wp-admin/users.php?page=bp-profile-setup” is only available to super admin.

    Does anyone know what capability it uses?


    CodeMonkeyBanana
    Participant

    @codemonkeybanana

    OK, so buddypress doesn’t use capabilities. How the hell am I meant to make this work?


    CodeMonkeyBanana
    Participant

    @codemonkeybanana

    Capabilities were a red herring! It uses manage_options whhich subsite admins have so its not a cpability issue.

    There must be an explicit is_super_admin() somewhere.

    I searched in the xprofile folder but no is_super_admin anywhere.

    I now feel like I am searching for a needle in a haystack.


    CodeMonkeyBanana
    Participant

    @codemonkeybanana

    Figured it out. I added “bp_moderate” to a new role and that role can see it now.

    It dawns on me there are several other things like this I will need to update 🙁

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom profile fields on BP multisite’ is closed to new replies.
Skip to toolbar