Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Odd Buddypress Problem with new signups?

  • Avatar of godavid33
    godavid33
    Participant

    @godavid33

    WP 3.9 BP 2.0.1

    I have a custom registration form. It works, as it makes a new user that can login. It doesn’t work as when said user tries to login in for the first few times, it shows a white screen. After a few refreshes, everything works as intended. I suspect the problem is from buddypress, as I used buddypress default data and tried to log into one of the fake accounts and it worked fine. It only seems to be with accounts that havent yet had any BP activity. On top of that, this occurs after clicking activate in the activation email.

    
    function create_user_from_registrant(){
    	$user_name = $_POST['first_name']."_".$_POST['last_name'];
    	$user_email =  $_POST['email'];
    	
    	$user_id = username_exists( $user_name );
    	if ( !$user_id and email_exists($user_email) == false ) {
    		$random_password = wp_generate_password( $length=12, $include_standard_special_chars=false );
    		//$user_id = wp_create_user( $user_name, $random_password, $user_email );
    		$user_id = bp_core_signup_user( $user_name, $random_password, $user_email, '' );
    	} else {
    		$random_password = __('User already exists.  Password inherited.');
    	}	
    	
    	mail($user_email,"Five Star Connect Beta Credentials","Thank you for registering for The Five Star Connect Beta. Your username is $user_name. Your temporary password is $random_password <a href='http://thefivestar.com/fsc-beta/members'>Click here to log-in.</a>");
    	echo $user_id;
    	die();
    }
    

    Above is my registration code. I have also tried by using wordpress’s registration function as opposed to the bp_core_signup_user function.

    Please halp :(

Viewing 8 replies - 1 through 8 (of 8 total)
  • Avatar of Dhyana
    Dhyana
    Participant

    @dhyana

    hi @godavid33
    I need to make some edits to my registration form, but I can’t find the darn file.

    Can you please let me know where this file is located, and what is called?

    I’ve got to add a field for a code (I have to create over 100 6 digit codes- numbers and letters – and have them only be used 5 times each) that each new registrant needs to use in order to register.

    HELP!

    Thanks!

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @dhyana
    It is located in this structure:
    your-site\wp-content\plugins\buddypress\bp-templates\bp-legacy\buddypress\members\register.php
    As always I advise using a child theme when making changes! Good luck!

    Avatar of Dhyana
    Dhyana
    Participant

    @dhyana

    That was FAST! Thanks @bphelp !!!

    I’ll try that :-)

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    Avatar of godavid33
    godavid33
    Participant

    @godavid33

    Btw, the solution to this problem was actually the BP Automatic Friends plugin. Something to do with calling get last user activity I believe on a new user causes an error. Could have solved this with debug enabled :S

    @Dhyana , I am using a totally custom reg form so not even the BP template. I don’t have much experience with the BP reg form itself, sorry. If you need help making a custom one let me know

    Avatar of @mercime
    @mercime
    Keymaster

    @mercime

    @godavid33 glad you resolved this on your own and thanks for posting how you resolved the issue. Cheers :)

    Avatar of kaizerking
    kaizerking
    Participant

    @kaizerking

    Added two fields in profile fields they are not displayed in registration form

    Avatar of godavid33
    godavid33
    Participant

    @godavid33

    @kaizerking you should probably start your own thread, as that is an entirely different problem ( actually, I would say same for you @dhyana , but your question was already answered haha)

    but if I had to posit a suggestion (in a new thread of course) it would be to use the plugin Theme My Login. It has saved me a good bit of headache as far as getting xprofile fields to show up on registration

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

The topic ‘[Resolved] Odd Buddypress Problem with new signups?’ is closed to new replies.