BuddyDev

Search

Replies

  • Participant
    Level: Guru
    Posts: 904

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

    Thank you

  • Participant
    Level: Guru
    Posts: 904

    Good day sir, please any update on this

  • Participant
    Level: Guru
    Posts: 904

    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: 904

    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: 904
    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: 904

    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: 904
    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

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

    I think adding this feature to the member types pro plugin would be a much cleaner approach. This will make the member types pro much more extensive.

  • Participant
    Level: Guru
    Posts: 904

    Yes testing for letter avatar would be much appreciated

  • Participant
    Level: Guru
    Posts: 904

    Sorry for the confusion, I could not get the code to work and I actually would prefer using your plugin but I want all normal redirects to go to the sitewide activity page instead of the redirecting to profile so that’s the main reason I could not use your plugin https://buddydev.com/plugins/bp-redirect-to-profile/

    Is there a way to make your plugin redirect elsewhere instead of profile so maybe then you could help with applying your suggestion here https://buddydev.com/buddypress-tutorial-redirect-user-first-login/

    SO by using your plugin
    1. All FIRST LOGINS REDIRECT TO A WELCOME PAGE
    2. ALL SUBSEQUENT LOGINS REDIRECT TO SITE WIDE ACTIVITY PAGE

    In fact, this might be a better opportunity for you to create a more comprehensive and dynamic login redirect plugin which can also work in harmony with this plugin below without any login or redirect conflict.
    1. Buddypress member types pro
    2. BP Auto Login on Activation
    3. BuddyPress Auto Activate Autologin Redirect To Profile On Signup

    Thanks for your help