Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing display name for trial owners #4311

Open
saracarl opened this issue Sep 5, 2024 · 1 comment · May be fixed by #4363
Open

missing display name for trial owners #4311

saracarl opened this issue Sep 5, 2024 · 1 comment · May be fixed by #4363
Assignees

Comments

@saracarl
Copy link
Collaborator

saracarl commented Sep 5, 2024

A lot of trials (project owner account creation) don't end up with a display name:

image

This is a problem. Can we require it? Or is it missing for some other reason?

(I feel like there's an open issue on this, but I can't find it.)

@WillNigel23
Copy link
Collaborator

Upon further investigation, we found out this happens when a user updates their real name to contain " " rather than just leave it blank (to be nil)

This will then update display_name to be an empty space string ' '

  def update_display_name
    if self.owner
      self.display_name = self.real_name
    else
      self.display_name = login
    end
  end

So that the override will detect that self[:display_name] is NOT nil so it grabs the empty string instead

  def display_name
    if self.guest
      'Guest'
    else
      self[:display_name].presence || self[:login]
    end
  end

@WillNigel23 WillNigel23 linked a pull request Sep 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants