AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

[Closed] How To Limit Username to 5 Characters

2 Posts
2 Users
0 Reactions
3,058 Views
Posts: 3
 jmkt
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@jmkt)
Active Member
Joined: 9 years ago
[#4558]

Instead of 3-15 characters I would like usernames to be between 3-5 characters long.  Can you explain how to go about this please?

Regards,

jmkt


1 Reply
Robert
Posts: 10716
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 2 months ago

You can customize wpForo template files. Particularly the in register.php in update save way.

wpForo theme files:

https://wpforo.com/docs/root/forum-themes/theme-files/

wpForo theme customization:

https://wpforo.com/docs/root/forum-themes/theme-customization/

Find this line:

<td class="wpf-register-field"><input autofocus required="TRUE" type="text" value="<?php echo esc_attr($user_login) ?>" name="wpfreg[user_login]" class="wpf-register-text wpfw-70" maxlength="30" /></td>

Change to this:

<td class="wpf-register-field"><input autofocus required="TRUE" type="text" value="<?php echo esc_attr($user_login) ?>" name="wpfreg[user_login]" class="wpf-register-text wpfw-70" maxlength="5" /></td>

Share: