Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hmmmm, valid question that I don’t have a complete answer for, but I have an answer for our side of things. However, the method will be different depending on version.

    In 4.1.3 or lower, you can check and compare against the user_status value that you can fetch with get_userdata(). We previously used this db column for setting approved status, and if I recall right, a value of 69 meant “pending user”.

    $userinfo = get_userdata( $user_id );
    if ( 69 == $userinfo->user_status ) {
        //do stuff here.
    }

    However, in 4.2, I made the conscious decision to move away from user_status in favor of a user meta value. So you’d need to do similar code like so

    $mod_status = get_user_meta( $user_id, '_bprwg_is_moderated', true );
    if ( 'true' == $mod_status ) {
       //User is moderated, do necessary stuff here
    }

    This user meta one won’t apply until I get 4.2 released, and that will likely be a couple weeks. I am giving an ample window of time for users to beta test if they wish. If no major show up by then, I’ll be pushing it up officially.

    That’s the part we cover. The part that I’m not sure of offhand is any wordpress hooks that you could use to hide profile fields for BuddyPress stuff. That part you may need to check on yourself, but hopefully the bits above will help.

    Thread Starter Jasper

    (@garyhamptonmcp)

    thanks for reply, I don’t really understand to be honest but need to know how to do it, i can only do so much with code if i know what to put and where to put it. This would be a great feature request. I would image others would want to hide some fields until a member is approved.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not sure this is an area that I want to steer the plugin towards. While it’s in the same general idea of intent, it’s still a different type of task as well, and I want to focus primarily on the prevention of access to the rest of the BP install. Not as worried about profile fields.

    Thread Starter Jasper

    (@garyhamptonmcp)

    Thanks for taking the time to communicate.

    I have found a temporary workaround but am using an old and unsupported plugin, I am surprised this plugin still works at all and don’t think it will survive many WordPress/pluing updates:

    BuddyPress xProfiles ACL

    I moved the profile fields I needed to hide into a new profile group called “Contact Details” I installed s2member for testing then disabled it, I then ended up using the new roles it created to achieve this:

    New user roles:

    Subscriber = Fresh sign up unapproved

    s2Member Level 1 = Access to contact details once approved and moved to this group

    s2Member Level 2 = Access to contact details and (mycred) banking once moved to this group

    But still need to fin a long term solution.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide some profile fields until approaved’ is closed to new replies.