1
0
mirror of https://github.com/flarum/core.git synced 2025-08-03 15:07:53 +02:00

feat(nicknames): allow OAuth to provide a nickname (#4004)

This commit is contained in:
Daniel
2024-10-22 14:52:25 +02:00
committed by GitHub
parent d8faf25383
commit f51df1c486

View File

@@ -57,7 +57,7 @@ app.initializers.add('flarum-nicknames', () => {
extend('flarum/forum/components/SignUpModal', 'oninit', function () {
if (app.forum.attribute('displayNameDriver') !== 'nickname') return;
this.nickname = Stream(this.attrs.username || '');
this.nickname = Stream(this.attrs.nickname || this.attrs.username || '');
});
extend('flarum/forum/components/SignUpModal', 'onready', function () {