remove fake names from profile
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
import type { IServiceProfile } from '@openpanel/db';
|
||||
|
||||
export function getProfileName(profile: IServiceProfile | undefined | null) {
|
||||
if (!profile) return 'No name';
|
||||
return [profile.firstName, profile.lastName].filter(Boolean).join(' ');
|
||||
if (!profile) return 'Unknown';
|
||||
|
||||
if (!profile.isExternal) {
|
||||
return profile.id;
|
||||
}
|
||||
|
||||
return (
|
||||
[profile.firstName, profile.lastName].filter(Boolean).join(' ') ||
|
||||
profile.email ||
|
||||
profile.id
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user