BuddyDev

Search

Replies

  • Participant
    Level: Guru
    Posts: 907

    it worked perfectly thank you very much

  • Participant
    Level: Guru
    Posts: 907

    Good day sir, Any update sir

    Thanks

  • Participant
    Level: Guru
    Posts: 907

    I did as instructed but old users who already have their photos uploaded are still being forced to upload another photo.

    Thanks

  • Participant
    Level: Guru
    Posts: 907

    Good day sir, I just want to remind you about this request

    Thank you

  • Participant
    Level: Guru
    Posts: 907

    Good day sir, please any update on this

  • Participant
    Level: Guru
    Posts: 907

    Thank you brajesh the code below worked

     // disable 4 letter limit in BuddyPress Username, set at atleast 2.
    add_filter( 'bp_core_validate_user_signup', function ( $result ) {
     
        // let us not worry if there are no errors or user name length is not the root cause.
        if ( ! isset( $result['errors'] ) || ! is_wp_error( $result['errors'] ) || empty( $result['user_name'] ) || is_numeric( $result['user_name'] ) ) {
            return $result;
        }
     
        // make sure it is our 4 letter issue.
        if ( ! empty( $result['user_name'] ) && strlen( $result['user_name'] ) < 4 ) {
            $result['errors']->remove( 'user_name' );
            // let us allow 2 letter or above.
            $allowed_length = 2; // change it to impose your own limit.
            if ( strlen( $result['user_name'] ) < $allowed_length ) {
                $result['errors']->add( 'user_name', __( 'Username must be at least 2 characters' ) );
            }
        }
     
        return $result;
     
    } ); 

    But I think there is a conflict with the WordPress Username Availability Checker plugin while this plugin is activated the old error message ( ‘Username must be at least 4 characters’ ) is still showing instead of the new error message ( ‘Username must be at least 2 characters’ )

    Thanks

  • Participant
    Level: Guru
    Posts: 907

    I know this is a security feature but login with username is disabled in my site, users can only login with email address.

  • Participant
    Level: Guru
    Posts: 907
    Tosin on in reply to: Restrict page access by member types #31768

    Hello,

    I thought I might add more suggestions like:

    Restrict access by member type for

    1. Post
    2. Pages
    3. Categories
    4. Custom post types

    For more ideas check out this plugin https://codecanyon.net/item/pages-by-user-role-for-wordpress/136020

  • Participant
    Level: Guru
    Posts: 907

    I want to allow them, while letter avatar plugin is enabled all users who haven’t uploaded their profile photo should be forced to do so.

  • Participant
    Level: Guru
    Posts: 907
    Tosin on in reply to: Restrict page access by member types #31726

    If a user who does not have member type access should try to access a member type restricted page, that user should either be shown a custom error message or be redirected to another page added in the member type setting.

    I think the redirection approach would be better.

    What are your thoughts

    thanks