– Is it possible as admin to change their username in the back office?
No, WordPress does not allow it. Usernames must be unique.
– Why the dot/period or special characters are allow in the username during the registration? and how i can block this?
There are various methods to restrict the characters allowed in a username when registering. Here’s one example:
http://wordpress.stackexchange.com/questions/124697/limit-username-to-specific-characters-a-z-and-0-9
I have found an answer for my second question: i use the plugin restrict usernames. Work great
Thank you @shanebp for this link.
So for few users who enter as username their email address, what can i do?
Thank
The link I shared above only allows letters and numbers.
So dots and @ symbols will be rejected.
Did you review the answer in that link?
Did you try it?
i didn’t try the answer in that link because i find the previous plugin before i view your answer.
Maybe it’s better to use a simple function that a plugin 😉
The Restrict Usernames plugin is pretty cool actually. I’ve used it in the past. Aside from specifying illegal characters, it will let you reserve words you don’t want normal users to register. Site name, admin, help, support all spring to mind.
Yes it is. But rather than using a plugin (for this project i am nearly at 53 active plugins…too much) maybe its better to use a function.
i use this thread to ask you another question, some users (registered before i applied this plugin) named their account with a period: john.doe . Actually it’s not a big deal because buddypress (or wordpress natively) transform this dot into hyphen in each link.
On one specific page template, I have special function i created with the help of a dev to display all users by a custom taxonomy (ranks)
Only mater is that every hyperlink that link to account like john.doe are display like this http://www.website.com/members/john.doe and not http://www.website.com/members/john-doe
I search into the code and found this:
<div><?php $user = get_user_by('id', $gold ); ?><a href="<?php echo site_url();?>/members/<?php echo $user->user_login;?>/buddyblog/"><?php echo bp_core_fetch_avatar( array( 'item_id' => $gold, 'type' => 'full' ) ); ?></a><a href="<?php echo site_url();?>/members/<?php echo $user->user_login;?>/buddyblog/"><?php echo $user->user_login; ?></a>Performances: <?php echo count_user_posts( $gold ); ?></div>
I must change how is display the username.
Thank you for your time and your help!
I think you might find it is the user_login
property has the value john.doe. I can’t remember where the hyphenated username is stored but try user_nicename
instead.
of course! as simple as that. Thank you @henrywright !