Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [users]

Refers to accounts with the ability to login and participate in a WordPress site.

0
votes
1answer
16 views

How do I delete a wordpress user from giant database?

The native wordpress delete users page is unable to load for us, as we have hundreds of thousands of user accounts that it queries and loads into a drop down menu every time the page is loaded. ...
0
votes
0answers
7 views

Sub user management / administrator able to see related users

Ey guys, basically i have been looking for a way in which i can allow a specific user role / administrator to list and manage only it's related users. Im not 100% sure in how to make it. Ive been ...
0
votes
1answer
14 views

create new users in db starting at what ID?

I have to create several hundred users using mysql. How do I know which user IDs to give them? I don't want to duplicate already-in-use IDs, so is there a way to check which IDs are safe to use for ...
0
votes
1answer
9 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
3answers
22 views

Return all users that have one or more published blog posts

I am working on a plugin for which I need to create an array of all users (name and ID) that have one or more publish blog posts. Looking at the documentation for get_users() it does not seem to ...
1
vote
1answer
21 views

RSS feed for a given user's post?

I know how to get the site's RSS feed - that get_bloginfo('rss2_url') but is there a way to get the same thing but only for a given user? Effectively the RSS feed of the posts listed on the author's ...
0
votes
0answers
6 views

How to change post_author when making a user as admin programmatically

When making a new USER in the backend singed in as admin, wp_posts signed assigns the post_author of that of admin, I need it to be changed so I can have search results reflect that of the actual user....
-1
votes
2answers
26 views

Ajax Request for both logged and non logged users

As my understanding, The wp_ajax_{action} hook only fires for logged in users. For logged-out users, wp_ajax_nopriv_{action}action is triggered on an ajax request. So, how can I write for both logged ...
0
votes
0answers
10 views

WP not sending “A New User Registered” emails to admin

I have a WP website and as an admin I do not receive emails when new users register. I am using WP Mail SMTP and I receive all other emails, just not the "A New User Registered" emails. Any ideas? ...
0
votes
2answers
15 views

User roles not displaying

Can anyone explain why I cannot see the role from the code below: $userID = get_current_user_id(); $user = get_userdata(userID); <?php echo $user->roles; ?> but I can see all the other user ...
0
votes
0answers
11 views

Linking WordPress User Profiles Together With Shortcodes

I am using Ultimate Member, and have franchise owners as one user role and shops as a different role. On the franchise owner profile, I have included a shortcode (that I need help with) to display the ...
0
votes
3answers
36 views

Multisite - maximum number of users with specific role

Is there any plugin or script where i can use to define maximum number of users with a specific role on subsite in a multisite network? I'm offering cloud helpdesk wordpress and pricing is based on ...
0
votes
0answers
7 views

Export WP users to SSO sevice provid

I am building another website (not WP) that will be accessible to some users only. Rather than asking for a new registration / login, I would like to allow my WP users to be able to connect to their ...
0
votes
2answers
18 views

How do I track which user clicked my button?

On a business listing in a directory I have a button which will lead to a custom plugin. The custom plugin needs to know the userid of the user (registered user) who clicked the button to get here, ...
0
votes
1answer
9 views

How can change user_login per user_nicename [on hold]

I really aprecciated our help How can I replace the content of "user_login" field with the same content of "user_nicename" in table wp_users? All user_login currently appear as "admin" How would ...
-1
votes
0answers
14 views

How may I add prefix on Woocommerce user ID?

Is it possible to add some sort of prefix, so that Woocommerce users get the ID on registration like 00001,
0
votes
1answer
21 views

Update a user profile via frontend

I'm very new to WordPress so I have a simple beginner question. I've added some custom user fields on the admin form with the action show_user_profile, edit_user_profile, personal_options_update, and ...
0
votes
3answers
48 views

Redirect after login based on user role (custom login page)

I created a custom login page and everything is OK but there is an issue. I want to redirect users to different pages based on their roles after login. My code is below but I do not know why it is not ...
0
votes
1answer
31 views

Add custom user meta data

I want to add a custom meta data for all the users with a default false value. I have researched about adding a meta data i.e, add_user_meta( int $user_id, string $meta_key, mixed $meta_value, bool $...
0
votes
1answer
34 views

Updating Custom WordPress User Meta Field via REST API

I have created an empty user meta field for a user called phone_number via the add_user_meta() function. When I use the get_user_meta function, I can see an empty string for the meta field which is ...
2
votes
0answers
48 views

Wordpress admin deleted user details not removed in database. How to delete WordPress Users from Database

When we delete a user from the WordPress admin panel it's removed, but the user values not deleted in the database. Anyone let me know how to fix the issue. ? What is the reason for this issue.?
-1
votes
1answer
24 views

how to show logged in members username in wordpress content

I'm working on a page on a site but got stuck at this point I want to show the logged in members username/first name of the site content for that I'm using this code <?php if ( is_user_logged_in()...
0
votes
0answers
17 views

WordPress and Azure Directory

We have a WordPress website that is synced with our Azure company directory. This allows users to access this WordPress website with their Email and password SSO (single sign on). Instead of users ...
-1
votes
1answer
16 views

Limit user access to installing/configuring a plugin?

I'm hiring a freelancer to install a plugin for me and setup a few of the plugin's more complicated settings. I don't know him personally and would like to limit his access, as there is sensitive ...
0
votes
1answer
20 views

Iterating users while user iteration is suppressed

Recently I noticed various login attempts being blocked by security plug-in this is pretty much ordinary when the attempt is about non-existent users or default/common user names like the website name,...
0
votes
0answers
21 views

Fetching all users that didn't post with rest api (current version 2)

By default, wordpress only shows you the users who have posted on the site through the /wp-json/wp/v2/users I want to fetch all users whether they have posted or not (using wordpress as a headless ...
0
votes
1answer
10 views

members only products

i'm looking to setup a website and would like to know if the Wordpress platform can accomodate these requirements. I need a members only area and I need the ability to sell certain products ONLY to ...
-1
votes
1answer
38 views

Forbid certain users to access a specific page

I want to build a blog where every user is allowed to post something (only text) after a successful registration. However, a user should only access other contributions from users who have uploaded at ...
0
votes
2answers
35 views

Assign a Post to a User

1 - I have a CPT, with 10 posts. 2 - I have 10 users Q : How can i assign a single post from my CPT, to an unique user ? -> Each user must see only it's assigned post (Each post will be assigned by ...
0
votes
0answers
18 views

Help hooking into user_register

I'm trying to do a POST request to my API when a user is created. I've installed Code snippets and added the following: add_action('user_register','my_function'); function my_function($user_id){ ...
0
votes
1answer
16 views

Upon running wp_insert_user() WP Keeps Saying user_login is already in the system when it isn't

I am needing to archive particular user accounts and create new ones using the original archived username, email, etc. My plan is to first update the current account with modified user_login, email,...
0
votes
0answers
17 views

Author changed upon publish

Currently, I have a script creating custom posts (reviews). I want to manually approve these reviews. Unfortunately, when I publish them, my account becomes the author of the review. Is there any way ...
0
votes
0answers
16 views

How to prevent deleteting specific user?

I've create user called 'root' and I want to prevent to be deleted. How can I do that in back-end, without any plugin?
0
votes
0answers
18 views

Hiding users on WP - works on localhost, not on target hosting

I use this code snippet for hide specified user in WP: add_action('pre_user_query','yoursite_pre_user_query'); function yoursite_pre_user_query($user_search) { global $current_user; $username = $...
4
votes
1answer
84 views

What's the difference between the capability remove_users and delete_users?

In the list of capabilities, I found there's both remove_users and delete_users. It's not clear to me what remove_users is supposed to do, the Codex documentation just says it was introduced in ...
0
votes
1answer
16 views

Set “editor” role to existing user

Using the User ID of an existing user, how do I change the role to Editor? Here's what I tried: $wpdb->query("UPDATE wp_usermeta SET meta_value = 'a:1:{s:6:\"editor\";b:1;}' WHERE user_id = '$...
0
votes
1answer
45 views

How to create a specific role to manage users

I have created a non-admin user role to manage users. I have given this role the following capabilities: Create User, Delete User, Edit User, List Users, list roles. A member with this role CAN create ...
0
votes
1answer
59 views

Call to undefined function get_userdata() in plugin

After refactoring/restructuring files in my plug-in, I now get the error Uncaught Error: Call to undefined function get_userdata() after code $current_user_id = get_current_user_id(); $...
1
vote
1answer
21 views

Is there a smart way to obtain a list of only some selected user meta data?

I have a case where, if I had written the DB and queries myself, I would just do something like SELECT name, firstname, email FROM users WHERE .... Returning me a list/collection/array, I mean, not ...
1
vote
1answer
26 views

Is there a way to identify a user in a custom REST API method?

In a custom REST API method, I would like to identify the user (typically get_current_user_id() then retrieve their data from database (things like they're role and some custom permission). But so ...
1
vote
0answers
38 views

Add New User, extra fields which are required?

I use these two functions to be able to set the first and last name when I go to Add New User: // Add First and Last name to Add New User function add_new_user_name_fields($user) { ?> <...
1
vote
2answers
85 views

Creating user in Firebase after Wordpress user registration

I have developed an App that uses Firebase. The user has to go through a Wordpress website and buy a subscription before being able to access the App. When a new Wordpress user registers, I would ...
0
votes
0answers
15 views

How to track and restrict external download script by logged in wp users?

My goal is to restrict direct download of external url (which has script) only to wordpress logged in users. I think we should track it by wordpress logged in user cookies. But i need a way to ...
0
votes
1answer
25 views

Filter to wp_list_authors

I am using wp_list_authors, to, how function name says, make a list of authors, but i want to show only "Authors". Now in my site, any account who publish a text ("Admin", "Editor") show his name in ...
-1
votes
1answer
30 views

User register hook can't access form request

I'm trying to add a few custom field to the registration form using the code below. After registrations customs fields with keys are created but they don't have any value. I think that my $_POST['...
0
votes
0answers
23 views

Permalink structure like facebook.com

I want permalink structure like facebook.com facebook.com/username/about facebook.com/username/posts facebook.com/username/photos facebook.com/username/videos facebook.com/username/reviews I need ...
0
votes
0answers
40 views

fine-grained capabilities for user related capabilities

When we want to adjust users capabilities, we can do so quite fine-grained. For example we can configure that a certain user can edit posts. But furthermore we can limit the capability of editing ...
0
votes
0answers
12 views

How can i export images and videos on wp personal data export page?

Is there a way to export user's profile photo in the WordPress user data export page. I have created users and i gave each one of them a profile photo. The problem is, when i export their data to the ...
1
vote
0answers
42 views

How to delete all customer user account that haven't placed a single order?

Recently I've had an influx of spam users registering on my Wordpress website and I am trying to delete them all if: they have a "Customer" role haven't placed at least one order before As I could ...
0
votes
1answer
36 views

Delete Users without a First and Last Name

I need to clean a WordPress Web site of SPAM users. I checked the Users list and noticed that valid users have a proper Name listed; SPAM users do not have that value and a - is displayed instead. ...