Remove Avatar Upload from custom Signup Page

Hey there

I made a custom signup page for my multisite installation by copying the signup.php into a custom template. Of course i made a few changes to that.

Anti-Splog, and the Remove E-Mail verification Plugin are working well with my custom signup. I also just removed some minor code.

After activating Avatars, some kind of jQuery error appeared which says "ajaxfileupload" is not a function.

After I replaced my custom form with the standard signup form everything worked well again - but of course this is not what i want

I would like to remove the avatar upload form the signup-form completely, is there a way to do this? Maybe by a filter?

I also receive the message below, after deactivating Avatars network wide:

Warning: Missing argument 2 for update_site_option(), called in /mypath/wp-content/plugins/avatars/avatars.php on line 140 and defined in /mypath/wp-includes/option.php on line 1200

Thank you!

Best,
David

  • Adam Czajczyk

    Hey David,

    I've downloaded your page template and tested it. How did you set it up? I've run the simplest possible test: I've just uploaded it into my root folder and accessed directly (after uncommenting those "require..." lines at the beginning) at it seems to work just fine for me.

    I've found out that in order to remove avatar field you just have to comment

    do_action( 'signup_extra_fields', $errors );

    line from the file (it's around line 242) so the show_user_form() function looks like this:

    function show_user_form($user_name = '', $user_email = '', $errors = '') {
    	// User name
    	echo '<label for="user_name">' . __('Username:') . '</label>';
    	if ( $errmsg = $errors->get_error_message('user_name') ) {
    		echo '<p class="error">'.$errmsg.'</p>';
    	}
    	echo '<input name="user_name" type="text" id="user_name" value="'. esc_attr($user_name) .'" maxlength="60" /><br />';
    	//_e( '(Must be at least 4 characters, letters and numbers only.)' );
    	?>
    
    	<label for="user_email"><?php _e( 'Email&nbsp;Address:' ) ?></label>
    	<?php if ( $errmsg = $errors->get_error_message('user_email') ) { ?>
    		<p class="error"><?php echo $errmsg ?></p>
    	<?php } ?>
    	<input name="user_email" type="email" id="user_email" value="<?php  echo esc_attr($user_email) ?>" maxlength="200" /><br /><?php // _e('We send your registration email to this address. (Double-check your email address before continuing.)') ?>
    	<?php
    	if ( $errmsg = $errors->get_error_message('generic') ) {
    		echo '<p class="error">' . $errmsg . '</p>';
    	}
    	/**
    	 * Fires at the end of the user registration form on the site sign-up form.
    	 *
    	 * @since 3.0.0
    	 *
    	 * @param array $errors An array possibly containing 'user_name' or 'user_email' errors.
    	 */
    	//do_action( 'signup_extra_fields', $errors );
    }

    Give it a try please and let me know if it worked for you

    Cheers,
    Adam

  • MapSteps

    Hey @Adam,

    i implemented my code as a template and setup a page with this, while redirecting wp-signup.php to my new signup page.

    your suggestion just worked like a charm

    do_action( 'signup_extra_fields', $errors );

    and the problem/and avatar on my signup page has gone, while every other fields/plugins like "select language on signup" and "anti-splogs reCAPTCHA" remain

    GREAT! Thank you Adam!
    Best,
    Dave