Questions tagged [username]
The username tag has no usage guidance.
112
questions
0
votes
0
answers
11
views
filter hook 'authenticate' runs twice
I am writing a custom function for logging into wordpress multisite. I take the name of the site via blog_id and append it to the username then pass it into 'authenticate' filter hook.
Eg)
Username ...
0
votes
0
answers
19
views
wp_user_query with meta_value_num for leaderboard
Context : I try to make a custom leaderboard with the WP_USERS_QUERY class and the custom code below. I use the gamipress plugin for points system. The leaderboard works fine, displaying correctly the ...
2
votes
0
answers
54
views
Username character requirements
I'm looking for the guidelines on creating a username within the members' section of a WordPress site. I'm using it with a business directory and I often get people reaching out because WP is saying ...
0
votes
1
answer
52
views
How to add @ symbol to user url
I want to add the @ symbol to the beginning of the username in the url
i find this code to remove author from url
But I do not know how I should change to add @ to the beginning of the usernames and ...
0
votes
0
answers
182
views
Redirect users with "." (dot) in their username and replace with "-" (dash) to correct profile
Im having problem with usernames that have '.' (dot) in their username and throwing 404 when try to access their profile page in front end. Can we replace this '.' (dot) with '-' (dash) because ...
0
votes
2
answers
38
views
Lock out all WordPress Administrators except two specific users
I used the snippet below to lock out all administrators and editors except myself
if ( is_user_logged_in() ){
$current_user = wp_get_current_user() ;
if ( in_array( 'administrator', (array) $...
1
vote
1
answer
2k
views
How do I display "Hello username" if logged-in on the homepage
I am trying to show the name of the currently logged-in user in a small text like 'Hello, username!'.
I tried to do this, but it doesn't work:
<p class="vam">
<?php if(...
0
votes
1
answer
45
views
Display a custom name when the user has no name settle in his account
I'm creating a code that shows the First Name for logged in users, using a shortcode, but I noticed that if the user has no name settle, it will display a blank space. How can I set a custom name to ...
1
vote
2
answers
7k
views
Display first name of logged in user?
I'm trying to create shortcodes that will display both avatar and logged in user first name in a text widget. I have managed to create something that displays the avatar, but not the username.
My code ...
0
votes
0
answers
93
views
Make Wordpress User Name be the Company Name when Registering (not the default 'first name' last name' email address')
Is it possible to make WordPress User Name the Company Name instead when user registers on a site.
So the Company Name Field on the form is used as the key field upon registration? (Not first name, ...
0
votes
1
answer
175
views
How to add logged in username after WordPress URL?
I found a great solution for this issue in this article:
How to add wordpress username after url?
/*
Plugin Name: My Awesome Button
Description: The shortcode [my-awesome-button] will be replaced ...
0
votes
0
answers
44
views
How to change default username field after login
if i go back to login page after logging in the username is shown in the username/email field(like the image bellow)
how can i set it to empty or the user email?
0
votes
2
answers
66
views
buddypress remove username from autocomplete
I am using Wordpress and Buddypress and i am trying to remove or hide the username that is being displayed in the autocomplete field of messages in Buddypress. Tried some tests from this post and also ...
0
votes
1
answer
392
views
Change user nicename without sanitize
How to remove sanitize from edit_user_profile action?
I have a possibility to change user_nicename with the following code:
function ex_insert_nicename_input( $user ) {
$content = ob_get_clean();...
0
votes
5
answers
174
views
Show username only if logged in in a <p> else no directly name
Hi I'm looking all over but I don't find the solution: I have an infobox with: Hi, welcome to our "some text"
Now I'd like to add posibility for logged in users "Hello Tony, welcome to our "some ...
0
votes
0
answers
939
views
How to use same username account for multiple users?
I have an ecommerce where I need to use same username for differents customers.
How can I do that?
Thanks a lot!
0
votes
0
answers
1k
views
Create a unique username with validation on wordpress registration
I want to add a unique username on registration and hide this field on the registration form. Its working so far, but its not 100% perfect, because if its 3 times the same number then it will throw a ...
0
votes
2
answers
129
views
Redirect user to a custom url after logged in
I'm using "Passwordless Login with OTP / SMS & Email - Facebook Account Kit" for login.
I want to redirect user to http://www.domain.com/author/<username>/screen after they log in
this is ...
0
votes
1
answer
281
views
How to get all multi-select user meta values and add them to an array?
I am trying to grab meta_values from a user profile's multi-select field, and convert them to usernames, which I will then input into an array. Let's say that the user has selected two options (out of ...
0
votes
0
answers
475
views
Allowing Non-Latin Characters In WordPress Registration
There exist a plugin for wordpress to enable usernames containing special characters (Russian, Cyrillic, Arabic …). Unfornetly this plugin didn't work for me. I have even a look at this solution but ...
1
vote
1
answer
250
views
Change username before login
How to change username before submitting in login form ?
I have used mobile number as username when a user registers in site. also I have removed 0 from the beginning of the mobile number. Now in ...
0
votes
1
answer
1k
views
How to auto-generate random numbers in username?
I have a public-viewed community site.
I am able to insert First & Last Name fields in WooCommerce Registration form, and auto-generate username based on the combination of First+Last Name.
But ...
1
vote
2
answers
37k
views
How to show my wordpress admin username & password?
When I created my WordPress website, I was given an admin login username and password. However, I have forgotten both. What is the procedure to find my WordPress admin login username and password from ...
0
votes
0
answers
29
views
How to assign a UserName value at creation
I want to allow users to register on my site. However, I want to assign the UserName value so that it is in a particular format and so that the user cannot change it. The format will incorporate the ...
0
votes
1
answer
187
views
Author name length character limit?
In comments, I want to limit author names. For example, the author's name should be no more than 10 characters. I'm looking for a way to do this. Thank you very much in advance.
4
votes
2
answers
2k
views
How can i force Display names to be the same as Usernames?
i need help. My users register to the website. They type their username user_login (see chello) but the Display name (see chello04) is not the same. It has a random two digits at the end.
Is there a ...
0
votes
1
answer
49
views
Reset admin and password
I had someone create my wordpress website. I cannot contact them and they have their email linked to the account. I am not sure of the username they set the account as. Do I need to start the website ...
1
vote
1
answer
6k
views
How to display user nickname (not display name) in PHP template?
I would like to display a nickname instead of username/display name on top of my website. I want to insert PHP codes which can display that Nickname in a PHP page. I have tried these codes below, but ...
0
votes
1
answer
95
views
Redirect user to specific link after login
I am new to wordpress so I will surely need more help than others to understand your answers. So, the question is:
I have this website with a login page on home. Let's supose you are a member. If you ...
0
votes
0
answers
31
views
How to gets users EMAIL by their USERNAME
If I have a users username, is it possible to take that and echo their email address instead?
I have a field in Gravity Forms that has the assigned user to that job. I have added some code that echos ...
2
votes
1
answer
1k
views
auto assign sequence base username while registration
i am trying to get a new user an auto assigned sequence based username(non editable by user) while registration.
so it will be starting from 0000000001 and so on, i have tried certain codes but my ...
2
votes
1
answer
6k
views
Username field is not shown in Woocommerce's registration contact form
I'm working on a Woocommerce website and I just came across this problem:
when I go to Account page and I'm asked to create a new account, in the form there isn't the "Username" field. There are ...
1
vote
0
answers
59
views
Restrict certain character combinations in username during registration
I am trying to restrict a certain combination of characters in a user name while they register.
I have restricted user names to numeric characters only, but now I am not getting a way out to restrict ...
0
votes
1
answer
162
views
I have restricted the username to numerical format but not able to integrate the same with PeepSo plugin
on my website i am using PeepSo Plugin and the restriction i put on wordpress signup page for username is not working on PeepSo Plugin.
my site have two registration page one is the default wordpress ...
2
votes
4
answers
4k
views
Register email as username
I am using Wordpress 4.9.4 in a Wordpress Multisite, and I need to allow users to register using their email address as username.
Looking at the code I found that what prevents me from accomplish that ...
0
votes
1
answer
169
views
add the user name to menu when user is logged in [closed]
i have this code but its not working it throws syntax error, unexpected '}' error
function my_custom_menu_item($items, $args)
{
if(is_user_logged_in() && $args->theme_location == '...
0
votes
1
answer
72
views
Wordpress not logged in locally with correct username and password
I'm unable to logged in wordpress in locally with correct username and password. When I enter the username and password and click the login button, it displays same log in page with empty password ...
0
votes
2
answers
845
views
How can I allow Arabic usernames in WordPress
I want to let users put there username in Arabic when they register a new account, I tried a lot of methods put problem still unsolved
0
votes
1
answer
910
views
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 ...
1
vote
2
answers
137
views
How to change a username?
How do I change a username? My username is showing up in search engines as an author but it's a product and services based site (using only pages) for a client. If I can't remove the author pages I ...
0
votes
1
answer
152
views
How to set an array of current usernames
I am trying to get this code working so I can list a set of usernames that are not allowed to see updates in the Wordpress admin panel. Right now it only works with a single username. Is there a way ...
1
vote
1
answer
228
views
How to retrieve lost username/ email log- in ?
I have couple of blogs hosted by wordpress.com (e.g. myspecialcorner.wordpress.com), and i have not been able to remember the username email log- n used for this wordpress.
For your advise on how ...
1
vote
0
answers
611
views
How can I display nickname instead username in links
This question is for Security.
I found this code here:
add_filter( 'request', 'wpse5742_request' );
function wpse5742_request( $query_vars )
{
if ( array_key_exists( 'author_name', $query_vars ...
2
votes
0
answers
545
views
Change Username?
A while back I was able to change the user-name in the wp_users table without problem. I noticed today that is not the case, or at least not with the super-admin user role.
How can I adjust the user-...
0
votes
3
answers
4k
views
Cannot login with correct username and password anymore
I can't log in with my correct username and password.
I get the message:
ERROR: The password you entered for the username is incorrect.
I have tried all the tips for fixing this problem I have ...
3
votes
3
answers
5k
views
How do I display the commentor's first name and last name in the comments?
How do I display the commentor's first name and last name in the comments?... rather than their username as currently shows.
0
votes
3
answers
341
views
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 ...
3
votes
3
answers
14k
views
Email as Username in registration
many users would to allow the registration in a wp site without an username, just only with an email.
This is a core problem, so the solution (a trick) is to replace username with email.
If wp ...
6
votes
1
answer
890
views
Problem with Hebrew characters in username
I wrote a plugin to enable hebrew characters in usernames. This is the full code:
add_filter ('sanitize_user', 'hu_sanitize_user', 10, 3);
//Overrides the Wordpress sanitize_user filter to allow ...
2
votes
1
answer
3k
views
How to set a minimum length for username in Woocommerce? [closed]
I need to set a minimum lenght for username in a website that use WooCommerce.
In a "standard" WordPress installation (without WooCommerce, I mean) I could use a snippet like this one:
function ...