Remove Display Name field from user profile settings

Username is the only user-facing name field. The display_name column
remains in the database since BetterAuth writes the OAuth provider name
there, and it serves as a programmatic fallback via getUserDisplayName.

https://claude.ai/code/session_01NUv93WRrufHhpZSMyY4bjs
This commit is contained in:
Claude 2026-05-15 16:39:16 +00:00
parent 927b79bf31
commit f897e7ee05
No known key found for this signature in database
2 changed files with 1 additions and 11 deletions

View file

@ -39,7 +39,7 @@ export function ProfileSection({ user, isInActiveDraft, success, error }: Props)
<div>
<h2 className="text-lg font-semibold">Profile</h2>
<p className="text-sm text-muted-foreground">
Your display name, username, avatar, and timezone.
Your username, avatar, and timezone.
</p>
</div>
@ -58,14 +58,6 @@ export function ProfileSection({ user, isInActiveDraft, success, error }: Props)
</div>
<Form method="post" className="space-y-4">
<div className="space-y-2">
<Label htmlFor="displayName">Display Name</Label>
<Input
id="displayName"
name="displayName"
defaultValue={user.displayName ?? ""}
/>
</div>
<div className="space-y-2">
<Label htmlFor="username">Username</Label>
<Input

View file

@ -118,12 +118,10 @@ export async function action(args: Route.ActionArgs): Promise<ActionData | Respo
}
if (intent === "update-profile") {
const displayName = formData.get("displayName") as string;
const username = formData.get("username") as string | null;
const timezone = formData.get("timezone") as string | null;
const timezoneValue = timezone && VALID_TIMEZONES.has(timezone) ? timezone : undefined;
await updateUser(session.user.id, {
displayName: displayName || undefined,
username: username || undefined,
timezone: timezoneValue,
});