Articles of username

php return username of currently viewed author profile

I’m at a loss. I have profiles developed for my wordpress website, and I want to display content on my page-profile.php that is specific per user profile. I’ve looked all around the codex and only found stuff like this: that only gets the current logged in user and this: that gets the current post […]

I want to change my user name

Is it possible to change my user name? It was only after choosing it that I realised I had misspelled it.

Custom User Registration script only allowing usernames with 16 characters

I’m noticing a weird issue on a custom User Registration page I’m using in WordPress. It seems as if WordPress will only accept usernames with 16 characters (NO MORE, NO LESS). The custom registration form asks for First Name, Last Name, Email Address and a Number. To prevent duplicate Usernames, the username is generated by […]

How to change the User name and Password of admin account

By default i have selected the Username of admin account as “admin” , of the WordPress CMS while installing wordpress first time. Now i want to deploy the webpage : considering the security precautions , i want to change User name and Password of admin account. Can anyone guide me on this. The database for […]

track all external links on blog via username

I’ve been searching for a plugin that can track all external links clicked on a blog. Unfortunately the ones that I’ve found are intended to track total clicks per link rather than tracking which user clicked on which link. Is there a plugin that will enable me to track links based on the username? If […]

How can I apply custom sanitization to new usernames?

I have a WooCommerce module creating WordPress usernames on my behalf. I want to make sure those usernames are sanitized according to my rules, which are stricter than the WordPress requirements. How can I hook / override sanitize_user to use my custom rules?

Display first name instead of username

I have a plugin that outputs username after login, I want it to display first name instead. Here is the code that does it. global $userdata,$user_identity; get_currentuserinfo(); if ($userdata->ID>0) { // User is logged in echo ‘<div class=”login”>’ . $before_widget . $before_title . “Welcome “.$user_identity . $after_title . ‘</div>’; echo ‘ <ul class=”login-links”> <li><a href=”‘.get_bloginfo(‘wpurl’).’/wp-login.php?action=logout&amp;redirect_to=http://’.$_SERVER[“SERVER_NAME”].$_SERVER[‘REQUEST_URI’].'”>Logout</a></li> […]

allow only lowercase user registrations

I’m trying to get allow only lowercase usernames are valid usernames in my wordpress blog. I managed to write a function but it does not seem to work. add_filter(‘validate_username’ , ‘simple_user’, 1, 2); function simple_user($valid, $username ) { if (preg_match(“/[a-z0-9]+/”, $username)) { // there are spaces return $valid=false; } return $valid; } Any ideas with […]

How to allow wordpress to create username with symbols like +

I want to allow users to create username with + symbol. but wordpess removing the symbol by the register validation process. If I gave username as abcd+123, the user registered with username as abcd123. I need the username registered as it is with + symbol. Answers are greatly appreciated.

Invalidate username if it contains @ symbol

I would like to let the user login either using username or email. The only way to find the email is by detecting @ symbol using strpos. However WordPress allow @ symbol in username too. Can someone help me to invalidate username if it contains @ symbol in it..