Prefer email for MFA account label (#609)
This commit is contained in:
parent
adf41b573d
commit
1e0e6cdfdd
@ -242,14 +242,14 @@ export default function MfaSetupPanel() {
|
||||
const nextAccount = typeof data?.account === 'string' ? data.account.trim() : ''
|
||||
|
||||
const resolvedAccountLabel = (() => {
|
||||
const username = typeof user?.username === 'string' ? user.username.trim() : ''
|
||||
if (username) {
|
||||
return username
|
||||
}
|
||||
const email = typeof user?.email === 'string' ? user.email.trim() : ''
|
||||
if (email) {
|
||||
return email
|
||||
}
|
||||
const username = typeof user?.username === 'string' ? user.username.trim() : ''
|
||||
if (username) {
|
||||
return username
|
||||
}
|
||||
const name = typeof user?.name === 'string' ? user.name.trim() : ''
|
||||
if (name) {
|
||||
return name
|
||||
|
||||
Loading…
Reference in New Issue
Block a user