Forums » SEPHP Help and Tips

Change Signup / Display Name

    • 5 posts
    January 26, 2018 12:24 PM EST

    Hi there,

    First post on the forums.  I'm building a website for couples and each account will be more or less a joint account.  In the signup process we have two first names and last names, then would like the display name to be something like (First1) & (First2) (Last1).  It would also be nice to have a use case for couples who use separate last names, so (First1)(Last1) & (First2)(Last2).  Of course we can change this manually in the user's account, but is there a way to automate that during signup?  I've found the portion of code that outputs that info, but I've not seen any reference on how to get those individual fields, just displayname and username options.

    Thanks in advance!

    • Moderator
    • 4694 posts
    January 26, 2018 12:59 PM EST

    Hi! Welcome aboard. laughing

    Where did you want this to show up? Have you checked for any plugins that might already do this, in the marketplace?

    • 5 posts
    January 26, 2018 1:10 PM EST

    Thanks Donna!

    I'd like for it to show up everywhere the display name shows, so in the feed, member page status area, etc.  I believe I took a look a couple of weeks back and didn't see anything but I will take another look to ensure.  I'm a web dev so I totally don't mind doing that myself, and in fact would actually prefer to do so as I have a few more changes that I imagine will take customization to complete.  I've looked through the development documentation I could find on the site, but I never found any way to reference individual fields (namely first/last name in this case) for display.  If there is a link somewhere to that documentation I'd love to have it for reference.

    • Moderator
    • 4694 posts
    January 26, 2018 1:17 PM EST

    I suggest checking the widgets that have the displayname showing and try experimenting. I'm not in code atm to check but the widget on the user profile that shows the profile fields should be of help. I will try to check on this thread after the weekend.  

    • 5 posts
    April 18, 2018 2:22 PM EDT

    Hey Donna,

    I know it's been a while, but I'd like to follow up on this if I could.  So I found where displayname was being used, but after scoping it out it seems like changing how Display Name is formatted would be easier than trying to modify every instance of displayname.  The thought is, I'd like to be able to modify displayname to use the format (Firstname1) & (Firstname2) (Lastname).   If we could handle this in the signup process this should solve all of my issues throughout the site, as everything will just call the displayname.  Could you give me some insight on how displayname is created?  I imagine there has to be some code handling the combining First Name & Last Name before it goes into the database, so theoretically I just need to add in the FirstName2 to that process.  Even if you had developer documentation on it I'm a-okay sifting through that, I just haven't been able to find any technical docs, only general feature documentation.

    Thanks for your help! 

    • Moderator
    • 4694 posts
    April 18, 2018 4:53 PM EDT

    The best developer documentation is looking in the code. It does have notes in it (comments). I suggest the user module first. Perhaps auth files?