BuddyDev

Search

BP Ajax registration

  • Participant
    Level: Initiated
    Posts: 5
    Emanuel Gonzalez on #5313

    I got a couple of questions about how the plugin works:

    1- Does it includes a “login” form/page? or do I need to use the one on my theme?
    2- Forgot password form/page is going to be available soon for the plugin?
    3- Is it possible to disable the user auto-activation? I need to verify the email before granting access
    4- Is there anyway to change the roles assigned when user register? I’m using WPLMS and it is only assigning the “Participant” role and I also need the “Student” role for new users
    5- Is it possible to pre-load the registration form within the index page to speedup the loading when user hits the Register button?
    6- Since I got multiple fields on the registration form it is too long right now, what is the best way to reorganize the fields to show them side-by-side instead of a vertical list? (if pagination were possible it would be better)

    Thanks in advance for your help!

  • Keymaster
    (BuddyDev Team)
    Posts: 24712
    Brajesh Singh on #5314

    Hi Emanuel,
    Thank you for posting.

    1. Not at the moment. I had plans to do it earlier but it has been delayed a little bit. It is coming for sure . Fir now, you will need to use your theme’s login.

    2. Same as first

    3 Yes, It can be done but I will suggest you using BuddyPress registration Options plugin that helps you to do it in better way instead of disabling activation.

    4. Yes, It can be done on ‘bp_core_activated_user’ . That will work for all users registered via ajax form or not.

    5. Yes, Pleasde visit Settings->BuddyPress->settings and you will see a checkbox there
    6. Yes, Please copy ajax-register-form.php from plugin to your theme and you may modify it as you please.

    For the above point 4, do you want me to post the code, If yes, Please let me know and I will do.

  • Participant
    Level: Initiated
    Posts: 5
    Emanuel Gonzalez on #5324

    Thanks for your answers Singh!

    And yes, if you can post the code change required I would be grateful.

    I would like to get assigned the “Participant” and “Student” roles assigned if it were possible.

  • Keymaster
    (BuddyDev Team)
    Posts: 24712
    Brajesh Singh on #5326

    Is that the actual name of Role? I need the actual name in order to use with the set role. THe above name seems like just the label.

    https://developer.wordpress.org/reference/classes/wp_user/set_role/

  • Keymaster
    (BuddyDev Team)
    Posts: 24712
    Brajesh Singh on #5336

    Hi Again,
    Thought I will post the code. You will need to change the role though.

    
    
    function buddydev_set_role_on_activation( $user_id ) {
    	$user = get_user_by('id', $user_id );
    	
    	$role_name = "contributor";//please change with your own role name
    	
    	if ( $user ) {
    		
    		$user->set_role( $role_name );// please change $role_name with your ow n role
    	}
    }
    add_action( 'bp_core_activated_user', 'buddydev_set_role_on_activation', 0 );
    
    

    You can put the above code in bp-custom.php

    Hope that helps.

    PS: Please do not forget to modify it.

You must be logged in to reply to this topic.

This topic is: not resolved