Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • Carlen
    Participant

    @carlen

    Thank you! this did help me realize where my errors were, but wasn’t working because I am using some code of automatic login. For anyone else this is what I came up with that works.

    I set up https://gravitywiz.com/documentation/gravity-forms-populate-anything/ and grab the groups from the wp database. I have them search and select the name, and then pass the value (ID) this to a hidden field.

    I then set up the following code. Included is some code to automatically log them in after they register too.

    function ip_gravity_registration_autologin( $user_id, $user_config, $entry, $password ) {
       $selected_team = rgar( $entry, '13' ); // Replace with the field for group ID	$group_id = $selected_team; //change it to the group ID of your choice
        groups_join_group( $group_id, $user_id );
    // Automatic Login: Only automatically login if we aren't *already* logged in
    if ( ! is_user_logged_in() ) { 
    // Get the user data (for the login)
       $user = get_userdata( $user_id );
    // Sign the user in
    wp_signon( array(
    'user_login' => $user->user_login,
    'user_password' => $password,
    'remember' => false, // Don't set the remember cookie
    ) );
    }
    }
    add_action( 'gform_user_registered', 'ip_gravity_registration_autologin', 10, 4 );

    Carlen
    Participant

    @carlen

    I am not sure what this may be for you, but I know that usually this is because the thumbnail version of the profile pic is being pulled and not the full version.

    It would be a php issue in the theme, not a css issue.


    Carlen
    Participant

    @carlen

    Yes, you can override buddypress files in your child theme. Just add the folder buddypress and any relevant sub-folders within that all the way to the file that you are overriding.

    You will probably use:

    buddypress -> members -> single -> member-header.php


    Carlen
    Participant

    @carlen

    You can use for logged in user:
    bp_displayed_user_avatar( ‘type=full’ );

    if calling within a group:
    bp_group_member_avatar();

    or in general (this is pulled for admin of a group, but can be set up in other ways):
    bp_core_fetch_avatar( array( ‘item_id’ => $admin->user_id, ’email’ => $admin->user_email, ‘type’ => ‘full’ ) )


    Carlen
    Participant

    @carlen

    I found this tutorial very helpful in doing this.

    How to Edit Group Meta Tutorial


    Carlen
    Participant

    @carlen

    I think the easiest way to do this would be to hide buddypress unless the user is in one of your courses.

    I would use a combination of:

    Memberpress (other membership plugins should work too)
    Learndash

    If Menu – Visibility control for Menu Items

    User Role Editor


    Carlen
    Participant

    @carlen

    I personally haven’t seen anything with this specific functionality out of the box, but this is partially due to not knowing what plugin you are using for sending messages.

    I have done similar style restrictions with:

    WordPress Membership Plugin


    and

    User Role Editor

    You give someone a user type when they pay and this works well with many different plugins, though it is possible you may need to get in and do some custom code for the “x” amount of “actions” per day.


    Carlen
    Participant

    @carlen

    I have buddypress BP xProfile Location and a custom api to connect to https://www.wpgmaps.com. Id be happy to share it.

    Not sure if this would accomplish what you need though.


    Carlen
    Participant

    @carlen

    Shane this is brilliant and exactly what I was looking for!

    …hours getting no where. I can’t thank you enough!

Viewing 9 replies - 1 through 9 (of 9 total)
Skip to toolbar