• Hi – Fantastic job, thank you so much!!!

    Just wondering if it was possible to populate the nickname field with the same info as display_name?

    I’m not a coder, but I can modify the file if you can supply the correct code. I was thinking maybe I could duplicate the following and substitute display_name for nickname:

    //set the display name
    	$display_name = trim($_POST['first_name'] . " " . $_POST['last_name']);
    	if(!$display_name)
    		$display_name = $_POST['user_login'];
    
    	$_POST['display_name'] = $display_name;
    
    	$args = array(
    			'ID' => $user_id,
    			'display_name' => $display_name
    	);

    Cheers,
    Nick

    https://www.ads-software.com/plugins/force-first-last/

Viewing 1 replies (of 1 total)
  • Thread Starter savage9r

    (@savage9r)

    Update – Upon further investigation, I found that I am not in need of duplicating this info into the nickname field. It looks like this plugin is not working at registration, but it is when manually updating the users in the dashboard.

    Most likely my issue may be caused by another plugin if it is working for others at registration. I am using WP-Members so it may be populating the display_name with the username after your plugin has run.

    I noticed in your readme.txt file:

    “it is always set to their first and last name, or username if those fields are empty.”

    My sight requires the first and last name fields in order to register – is there some code I can remove that checks to see if those fields are empty? (they will never be empty).

    Or, is it possible to order your plugin to run last?

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Possible to duplicate info to nickname as well?’ is closed to new replies.