Hello everyone,I followed the tutorial of FLARUM Chinese community,
Modified to support Chinese username registration,
After the modification is completed, Chinese can be registered normally,
and the front-end click to enter the user's personal homepage is normal, but it cannot be displayed after refreshing.
Backend user management, even if you click on the user name, the page cannot be found.
Is there any code that still needs to be modified? Thanks!
Modified these:
file:/vendor/flarum/core/src/User/UserValidator.php
Line 47: 'regex:/^[a-z0-9_-]+$/i'
change: 'regex:/^[-_a-zA-Z0-9\x7f-\xff]*[-_a-zA-Z\x7f-\xff][-_a-zA-Z0-9\x7f-\xff]*$/i',
file:/vendor/flarum/core/src/Forum/Auth/Registration.php
Line 101:$username = preg_replace('/[^a-z0-9-_]/i', '', $username);
change:// $username = preg_replace('/[^a-z0-9-_]/i', '', $username);
file:/vendor/flarum/core/src/Api/Controller/ShowUserController.php
line 63: fromSlug($id, $actor)
change:fromSlug(urldecode($id), $actor)
err link:https://discuss.flarum.org.cn/u/%E6%9F%A0%E6%AA%AC%E4%B8%8D%E6%98%AF%E5%90%83%E7%9A%84