mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:12:59 +08:00
Don't override username if already set
This commit is contained in:
parent
ae18e30063
commit
2f3569bed5
|
@ -61,7 +61,9 @@ export default class Translator {
|
|||
// translation key. This will allow a gender property to determine which
|
||||
// translation key is used.
|
||||
if (input.user instanceof User) {
|
||||
input.username = username(extract(input, 'user'));
|
||||
const user = extract(input, 'user');
|
||||
|
||||
if (!input.username) input.username = username(user);
|
||||
}
|
||||
|
||||
// If we've found the appropriate translation string, then we'll sub in the
|
||||
|
|
Loading…
Reference in New Issue
Block a user