BuddyDev

BuddyPress Force Profile Photo

BuddyPress Force profile Photo plugin forces users on a BuddyPress site to upload a profile photo before they can use any feature of the site. It's simple and effective.

It won't restrict the site admins, only the normal members are restricted from using site features if they do not upload a profile photo.

The new update includes support for excluding users joining via social networks.

This plugin is deprecated in support of our BuddyPress Profile Completion. Please use BuddyPress Profile Completion

Screenshots:-

Change profile photo screen

Skipping url from the restriction/check:-

Version 1.0.6 & above allows skipping certain urls using the filter bp_force_profile_photo_skip. If the function attached to this filter returns true, the checks will be skipped.

Example 1:- Do not redirect on non BuddyPress pages

/**
 * Do not redirect users on non bp pages.
 *
 * @param bool $skip should we skip or redirect.
 *
 * @return bool
 */
function buddydev_skip_redirect_on_non_bp_pages( $skip ) {

	if ( ! is_buddypress() ) {
		$skip = true;
	}

	return $skip;
}

add_filter( 'bp_force_profile_photo_skip', 'buddydev_skip_redirect_on_non_bp_pages' );

 

Example 2:- Skip Members directory from the check( Will not restrict user from visiting members directory)

/**
 * Example to show skipping urls from the BuddyPress Force Profile Photo plugin
 *
 * @param boolean $skip
 *
 * @return bool whether to skip or not?
 */
function buddydev_skip_urls_from_force_profile_photo( $skip ) {

	if ( bp_is_members_directory() ) {
		$skip = true;
	}

	return $skip;
}
add_filter( 'bp_force_profile_photo_skip', 'buddydev_skip_urls_from_force_profile_photo' );

Github Repo: – https://github.com/buddydev/bp-force-profile-photo

 

Release History

  • Version: 1.0.7

    Monday, 28 June, 2021
    • Tested With: BuddyPress 8.0.0
    • Compatible With: BuddyPress 6.0+

    Fix the issue for photos uploaded by site admins. Now, It will record the proper user id even when uploaded by admin.

  • Version: 1.0.6

    Thursday, 10 August, 2017
    • Tested With: BuddyPress 2.9.0
    • Compatible With: BuddyPress 2.0+

    Updated to add filter 'bp_force_profile_photo_skip' for skipping the urls

  • Version: 1.0.5

    Thursday, 16 June, 2016
    • Tested With: BuddyPress 2.6.0 RC1
    • Compatible With: BuddyPress 2.0+

    Updated to fix the social login(missing return statement) and include Russian translations(thanks to slaffik)

  • Version: 1.0.4

    Saturday, 13 February, 2016
    • Tested With: BuddyPress 2.5.2
    • Compatible With: BuddyPress 2.0+

    Add another meta for WordPress Social Login plugin

  • Version: 1.0.3

    Tuesday, 15 December, 2015
    • Tested With: BuddyPress 2.4.3
    • Compatible With: BuddyPress 2.0+

    Fixed sql for other social sites

  • Version: 1.0.2

    Sunday, 13 December, 2015
    • Tested With: BuddyPress 2.4.2
    • Compatible With: BuddyPress 2.0+

    Add translation support

  • Version: 1.0.1

    Wednesday, 11 November, 2015
    • Tested With: BuddyPress 2.4 RC
    • Compatible With: BuddyPress 2.0+

    Add support to exclude users registering from social networks. Adds supports for kleo, wp fb autoconnect , wp social login plugin

  • Version: 1.0.0

    Saturday, 25 April, 2015
    • Tested With: BuddyPress 2.2.3.1
    • Compatible With: BuddyPress 2.0+

    Initial release