Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter jlaw

    (@jlaw)

    Hi all,
    I have resolved the problem myself. But I still didnt manage to display nickname in place of username. Instead, I modified the registration functions to where it allows username in unicode. The 2 functions that I modified are validate_username and wp_insert_user, both are in “registration-functions.php. It was lazy workaround, I know. I simply changed the 2nd parameter in a function called “sanitize_user” to “false”. The sanitize function removes any invalid characters or codes in username string. If u enters a username like “中国ABC”, the sanitize function will reduce the string to only “ABC”. I hope this is helpful for those are interested in enabling unicode in username.

    ******************W A R N I N G S**************************
    But there will be some side effects because you will need to encode unicode username if u need to incorporate username in URL. For example, domain.com/usr/中国ABC is impossible. Just a reminder.

Viewing 1 replies (of 1 total)