}
}
else {
+ $defaultName = WCF::getLanguage()->getDynamicVariable('wcf.user.security.multifactor.totp.deviceName.default');
$sql = "INSERT INTO wcf".WCF_N."_user_multifactor_totp
(setupID, deviceID, deviceName, secret, minCounter, createTime)
VALUES (?, ?, ?, ?, ?, ?)";
$statement->execute([
$setupId,
Hex::encode(\random_bytes(16)),
- $formData['data']['deviceName'],
+ $formData['data']['deviceName'] ?: $defaultName,
$formData['data']['secret'],
$formData['data']['code']['minCounter'],
TIME_NOW,
<item name="wcf.user.security.multifactor.active"><![CDATA[Aktiv]]></item>
<item name="wcf.user.security.multifactor.backup.generateCodes"><![CDATA[Codes generieren]]></item>
<item name="wcf.user.security.multifactor.totp.devices"><![CDATA[Eingerichtete Geräte]]></item>
+ <item name="wcf.user.security.multifactor.totp.deviceName.default"><![CDATA[{TIME_NOW|plainTime}]]></item>
</category>
<category name="wcf.user.trophy">
<item name="wcf.user.trophy.trophyPoints"><![CDATA[Trophäen]]></item>
<item name="wcf.user.security.multifactor.active"><![CDATA[Active]]></item>
<item name="wcf.user.security.multifactor.backup.generateCodes"><![CDATA[Generate Codes]]></item>
<item name="wcf.user.security.multifactor.totp.devices"><![CDATA[Set Up Devices]]></item>
+ <item name="wcf.user.security.multifactor.totp.deviceName.default"><![CDATA[{TIME_NOW|plainTime}]]></item>
</category>
<category name="wcf.user.trophy">
<item name="wcf.user.trophy.trophyPoints"><![CDATA[Trophies]]></item>