Events Made Easy Forums How do I … How can I change what EME uses to set WP user name

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #64825

    I think my solution would be similar to, but I am at a loss for how to modify and apply:

    I have looked through settings and I cannot find where EME uses the first and last name of an RSVP set to create new users, I would like this to be set from a custom field for nickname or username.
    I do not currently have a separate system for creating WP users but that is an option for me also, just makes new users being a 2 step process for events.

    PS. so far as I take each step through testing this, EME is working out to be a very complete system with great functions. I hope when I’m done configuring everything it will be the last event software I test.


    It is in fact EME that creates a username based on firstname/lastname (also like wp does).
    But in the thread you mention, you see an example:

    function eme_my_wp_userdata_function($person){
       $userdata['display_name']=$person['firstname'].' '.substr($person['lastname'],0,1);
       return $userdata;

    To change the username you’d need to set $userdata[‘user_login’], but in the current EME version that’s being ignored and overwritten by the EME generated username. This fixes it (only the change in eme-functions.php is needed):


    Thank you for the quick reply. I have scrolled through many of the other documentation files. One thing I cannot find is an example using Custom Fields except for one example with event headers. Is this possible to do with other hooks and filters?

    I have a form that uses #_FILED{username} and I would like to use that input to create the WordPress Username. Username is a custom people field.


    Once you have $person (in your filter), you can get the people-fields using something like:

    $answers = eme_get_person_answers($person[‘person_id’]);

    When you do a print_r on that, you’ll see the info 🙂
    But just using the user input as username might not be ok. You can call the eme function eme_generate_unique_wp_username to assist in getting a good username. However, first apply then 🙂

    Btw: do read this post:

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top