Skip to main content

Questions tagged [user-meta]

User meta data consists of key-value pairs pertaining to the according user ID.

0 votes
1 answer
21 views

Default Usermeta Entries for every newly created user?

we have a Buddyboss page running with 30k users. Our usermeta Table is growing fast because of a few plugins we use which all seem to write a lot of settings to it. I try to remove as many obsolete or ...
tim's user avatar
  • 164
0 votes
0 answers
8 views

WP_User_Query get_count issue with meta_query relation

I'm using WP_User_Query to count the total number of users based on specific criteria. Generally, the following code works well: $args = [/* your arguments here */]; $query = new WP_User_Query($args); ...
RafaSashi's user avatar
  • 487
0 votes
1 answer
18 views

wp_user_meta doesn't return data in a foreach loop

I am attempting to get meta data in a list of WP users using this code, but am unable to retrieve the meta data: $args = array( 'meta_key' => 'last_name', 'orderby' => 'meta_value', '...
zeldatron's user avatar
0 votes
1 answer
25 views

How to use 2 different databases but share the same user in wordpress

I have 2 wordpress websites on the same server, one is bloo.com and the other is forum.bloo.com. each site has its own database, they have their own wp_content, each has its own file separately, but I ...
Mike's user avatar
  • 1
1 vote
2 answers
32 views

Include New Meta Field In New User Registration Email

I am currently using the below code to add some meta fields to my users and would love to include these in their registration email, but it appears they are not created before the email is sent. // ...
Matt Holt's user avatar
0 votes
0 answers
23 views

Problem with custom user fields default value and retrieval

I created 2 custom fields for users on my site, a Company name and a checkbox for whether a user has download access or not. Here is the snippet for the functionality: add_action( 'edit_user_profile', ...
Miroslav Kazimirovic's user avatar
1 vote
0 answers
27 views

add_filter( 'user_has_cap','my_function', 10, 3 ); and call to get_users in my function triggers an infinite loop in user list

I use: add_filter( 'user_has_cap','my_function', 10, 3 ); In user list to allow users to edit only a specific list of users with a meta user identical to a current user connected. To get the list of ...
Alejandro Antolinez's user avatar
0 votes
1 answer
42 views

Sort users in admin screen by meta value whether it exists or not

I want to list all users and order them by a meta value. Several users have it and some do not, but I want to be able to list them all and group them accordingly. I have the following code but it only ...
Badger's user avatar
  • 193
0 votes
1 answer
32 views

generate an array of user login date using update_user_meta();

I have begun to create a function to store last login date of user using time() function. Perfectly works! Now I want to store in a serialize array a list of all user login date. Question : Do I have ...
imagIne's user avatar
  • 83
0 votes
0 answers
23 views

Need some suggestions with Relationship fields and CPT/ACF

I am tasked with creating a Student/Teacher Portal where among other things, I need a way to build a way for Admins to assign Teacher with Students based upon Subject and Age group (Age for students). ...
RitZz's user avatar
  • 1
0 votes
2 answers
125 views

Is there a way that we can change wordpress user id?

I would like to ask if there's a WordPress plugin that can be used to modify the user ID of the user. Instead of 1 or 4, I will add a prefix like 387101 or 387104. If none, is there someone here in ...
Fonacier Jr. Balatero's user avatar
0 votes
1 answer
27 views

Administrator user cannot access dashboard after localwp import

This is the 2nd time this has happened in the past few weeks so I thought I would try and get some ideas on how to overcome. There are a few others in the localwp community that have had the same ...
php-b-grader's user avatar
0 votes
2 answers
12 views

Transform user name before displaying

Users are created whith name in upper case on my site, but some admin want to display it in lower case. I had a custom field in user profile to identified those admin, but I don't know what hook I can ...
Jean-Christophe Barrez's user avatar
0 votes
0 answers
11 views

How to add usermeta for existing users when user profile is updated

I need to add an usermeta field for users when they decide to modify some account informations on a custom form. At the moment I'm calling the wp_update_user() but since I want that the modifications ...
OHICT's user avatar
  • 133
0 votes
1 answer
37 views

Group users by meta field, with name of meta field as group title

I'm creating a employee photo directory based off users from my site. I'm trying to add front end filtering for this query and I have it mostly working. What I'm trying to accomplish is to sort the ...
NW Tech's user avatar
  • 707

15 30 50 per page
1
2 3 4 5
60