Join our new community forum for support & discussion

Join Now

Home Support Themes TaskHive How do you customize the register page to not default username your email name?

How do you customize the register page to not default username your email name?

  • Author
    Posts
  • cloudlyfe777

    Right Now it does not allow the username to be added when you signup/register.
    It only asks email and password to register, and it defaults the user name to be the email name.

    For example if I register a new user as John.Carter@gmail.com My username become John.Carter when I post a listing or request a service. But my client does not wish their real names to be shown every time they post something.

    How do we customize the register page to input a username along with a email address?

    and how do we make customer to create strong password like have at lease a letter a number and a special character?

    yevhen developer

    1) Please disable option Generate username from the email address in HivePress/Settings/Users section to input a username along with a email address

    2) Please try this PHP snippet. It will add checking for password field by your requirements (at least one letter, at least one number and at least special character)

    add_filter(
    	'hivepress/v1/forms/user_register',
    	function( $form ) {
    		if ( isset( $form['fields']['password'] ) ) {
    			$form['fields']['password']['pattern'] = '(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[^A-Za-z0-9])';
    		}
    
    		return $form;
    	},
    	1000
    );
Viewing 2 posts - 1 through 2 (of 2 total)

New Reply

This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.