8
submitted 4 days ago* (last edited 3 days ago) by DaPorkchop_@lemmy.ml to c/lemmy_support@lemmy.ml

While trying to update my display name, I've realized that any display name longer than 20 characters gets rejected (specifically: https://lemmy.ml/api/v3/user/save_user_settings returns 400 with {"error":"invalid_display_name"}). Some digging through the code seems to explain why: Lemmy 0.19.20 (the version running on lemmy.ml) uses the same config option for limiting display name length as it does for usernames, which defaults to 20 (and .ml hasn't changed it from the default value)¹.

I would be satisfied with that explanation, except there are clearly other users on my instance whose display names exceed 20 characters (example: https://lemmy.ml/u/Trying2KnowMyself). So, my question is: how the heck are people able to set these longer display names?

¹ In the 1.0 betas the config option seems to have been replaced with hardcoded limits which are separate for user- and display names, but I don't think that'd be relevant since that's not the code which .ml is actually running

EDIT: I figured it out! Importing user settings from a json backup bypasses display name validation. Most likely the user I referenced as an example had imported their profile from their Hexbear alt, so it ended up just copying their display name over as well.

top 6 comments
sorted by: hot top new old
[-] Trying2KnowMyself@lemmy.ml 1 points 2 days ago

Hmm, I feel like I gotta clear up some misconceptions.

  1. The Hexbear account is not my alt, it’s my main
  2. Hexbear unfortunately does not allow me to define the appropriate number of pronoun forms, I’m limited to 2 pairs of 2
  3. I did not import from Hexbear and my display name is not an “accident”
  4. User tags only notify in comments until 1.0.0 (maybe not a misconception since I’m not sure if that’s even a proper tag as-is, and maybe you weren’t actually intending for me to see the post)

Congrats on figuring it out, I just ~~vagueposted~~ complained in my profile without bothering to try to fix things myself until a cool cat gave me a hand.

[-] Texas_Hangover@lemmy.radio 1 points 3 days ago

trying2knowmyself has 17 characters.

[-] DaPorkchop_@lemmy.ml 1 points 3 days ago

Their username is Trying2KnowMyself, but their display name is "Trying2KnowMyself [they/them/their/theirs/themself]" which is significantly more than 17 characters

[-] Texas_Hangover@lemmy.radio 1 points 3 days ago

If I remember correctly, all the extraneous stuff in brackets is just flair that you can set to whatever. It has nothing to do with your username.

[-] DaPorkchop_@lemmy.ml 1 points 2 days ago* (last edited 2 days ago)

I know, and I am not trying to change my username. The display name is an arbitrary string which, if set, is shown in place of the username. Many users have their display name formatted like " []", but it doesn't have to be related to the username at all - I could set my display name to "aaaaaaaaaaa" or "ಠ_ಠ" if I wanted to.

I also wasn't asking how to set a display name, I know how to do that. My question was how people set their display name to be longer than 20 characters, since although that is the limit of what Lemmy allows, some users have display names exceeding the limit.

Anyway, the question isn't an issue anymore, since I figured out how the user in question managed to circumvent the limit.

[-] kuiskaaja@lemmy.ml 1 points 4 days ago

i can't even change my display name lol

this post was submitted on 01 Aug 2026
8 points (90.0% liked)

Lemmy Support

5087 readers
4 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 7 years ago
MODERATORS