mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-22 00:18:45 +00:00
If user has no linked account, ensure that their skin is set to default
This commit is contained in:
@@ -131,3 +131,14 @@ export function getAudience() {
|
||||
const domainname = hostname.split(".").slice(-2).join(".");
|
||||
return domainname;
|
||||
}
|
||||
|
||||
// Check if the user's account is linked to a Discord or email account.
|
||||
export function hasLinkedAccount(
|
||||
userMeResponse: UserMeResponse | false,
|
||||
): boolean {
|
||||
return (
|
||||
userMeResponse !== false &&
|
||||
(userMeResponse.user?.discord !== undefined ||
|
||||
userMeResponse.user?.email !== undefined)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user