• foolmars

    (@foolmars)


    Hi. I user WP-User Moderation (and Force Field Registration to require both the first name and the last name in the registration panel)as a plug-in so that the one can only register upon approval by the site’s administrator. Can anyone teach me how to hack the code so as to automatically set the display name to “first name + last name” when the registration e-mail is sent?

    I’ve already modified the code so that user won’t be able to modify the display name after registration so all I need to do now is ensure that it fixes itself before users log in for the first time. Any advice would be appreciated. Thanks!

    PS. Also would be interested in learning how to initially make the website field of the registrant be his author page (i.e. https://site-name/index.php/author/name. This field though unlike the display name can be modified by the user.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi foolmars — if you are still keeping track of this post:

    I can’t help you with your problem, although I share it (I’m assuming you mean the email to the admin notifying them a new user registration request).

    But I’d like to make it such that no new user can alter how their name is displayed. At present, the default “display name publicly as” setting on my blog is to “username” rather than “Firstname Lastname”. I’d like to change it to the latter and make sure that new users cannot alter that. From what you say, you seem to have managed to do that — would you mind letting me know how?

    Thanks

    SM

    Thread Starter foolmars

    (@foolmars)

    You just need to hack profile.php in the admin folder. Look for this part:

    <p><label><?php _e('Username: (no editing)'); ?><br />
    <input type="text" name="user_login" value="<?php echo $profileuser->user_login; ?>" disabled="disabled" />
    </label></p>

    And note the disabled variable.

    PS. AS an addenum to my original query, I was wondering if it was possible (upon registering) for the code to automatically correct the caps on the first name and the last name so that it is properly cased. i.e. John Doe instead of john doe.

    Hi foolmars

    Thanks for that, but I’m still pretty new at this, so please bear with me.

    Could you let me know exactly which part of:

    <p><label><?php _e(‘Username: (no editing)’); ?>
    <input type=”text” name=”user_login” value=”<?php echo $profileuser->user_login; ?>” disabled=”disabled” />
    </label></p>

    … I should change, and what it should read instead? Is it that I should just delete disabled=”disabled”? Or do I change it to something else?

    Thanks for your help.

    Thread Starter foolmars

    (@foolmars)

    I think the basic configuration is that the disabled option isn’t there… and you add it so that the user won’t be able to touch the field at all.

    Thanks for your response foolmars. The disabled=”disabled” code is already there.

    I’ll play around with that file and see what happens.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Display Name as Full Name upon Registration’ is closed to new replies.