إسقاط الأحرف الخاصة في أسماء المستخدمين

On our main site there are often people who use underscores and dashes in usernames. When they are ported to our Discourse forum, one or more of those characters is often dropped from the username, resulting in a mismatch.

The forum is provided for the site users only and being able to correlate between the usernames is important.

Examples:
kayakaya_ becomes kayakaya
__aena13 becomes _aena13

At present we haven’t figured out how to either automatically delete or disable forum accounts when the mains are closed or at least generate a report. Is that possible?

The usernames are being auto-edited to reflect the Discourse rules for usernames.

That’s pretty much what I figured. Thankfully we have found a place that keeps the actual username intact.

We recently added two site settings which allow you to permit more characters in the username

Did you try tweaking those?

We’ll take a look at that and see if it helps. Thank you.

We are seeing this too with SSO as well with usernames being converted.

I have mentioned this here, but this topic is more recent — maybe someone can take a look.

With the introduction of the Unicode support for usernames/groups, it is now possible to have usernames like 中国 (which is awesome!) but Discourse doesn’t allow usernames to start/end with a dash (but, eg, underscore is fine).

Is there a reason for preventing dashes in the first/last position? Any chance this policy can be revised if there’s no obvious downside to it? /cc @Falco

It does get difficult when users put in a special character because the username they want is taken.

You can try overwriting those rules in a custom plugin and living with it for a few weeks. If it shows no problems in normal Discourse usage, send a pull request.

لقد جربت هذا الأمر وتمكنت من جعل الشرطات في بداية ونهاية أسماء المستخدمين تعمل بشكل جيد، بما في ذلك في الإشارات.

ولكنني لم أحظ بنفس الحظ مع الشرطة السفلية في بداية ونهاية اسم المستخدم، لأن محلل التنسيق في محرر الرسائل يبدو أنه يعمل قبل الإشارات @: حيث يتم عرض اسم المستخدم بخط مائل بدلاً من كونه رابطًا.

أنا عالق حاليًا في هذه النقطة ولا أعرف أين أبحث لحلها. هل لديك أي نصيحة يا @Falco؟