Questions tagged [users]

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

Filter by
Sorted by
Tagged with
2 votes
1 answer
278 views

How to filter users list on user_status field with get_users()

I simply want to get the list of users with get_users() but filtering on the field user_status=0 so the spam and unactivated users are removed from the list. This does not work: get_users( '...
user avatar
  • 322
0 votes
1 answer
30 views

How to display text if profile fields are not filled?

How to display any text/content if all buddypress user profile fields are not filled? Here is my code which retrieves field data if the field is filled by the user: $fields = array('Field 1', 'Field 2'...
user avatar
  • 27
0 votes
0 answers
43 views

On Users (user.php) in wp-admin disable/hide "Bulk Actions" and "Change Role To"

How do I disable or otherwise hide the row that displays "Bulk Actions" and "Change Role To"? I'd ideally prefer not to do it with CSS.
user avatar
0 votes
1 answer
38 views

Admin Panel 404 Error after login

well i've created a custom login page (NOT customizing orignal login page) and use the code below to log in users: if($_POST){ if (!empty($_POST['username']) && !empty($_POST['password'])) ...
user avatar
  • 1
0 votes
1 answer
94 views

cannot get user_registered date from get_user_meta

I am trying to display the user_registered date from get_user_meta but it always displays as empty. If I try another field I do get a value so not sure why I don't see anything for the date. If I ...
user avatar
0 votes
2 answers
46 views

Get all commenters on a post

I know there are several similar questions, but I couldn't find the one I wanted. I want to get all commenters's on a post. But if there is a commenter who gives more than one comment, then he is not ...
user avatar
  • 1
1 vote
2 answers
25 views

Wordpress User Meta & ChromePHP or other way to debug/view php variables

I am developing a plugin to extend BuddyBoss platform. Specifically I am sync'ing BB user info with Wordpress User meta data. Most of my code works (country and regional organisation update fine), but ...
user avatar
  • 33
1 vote
0 answers
27 views

Favorite taxonomy archive page?

I have a website with multiple Genre's as custom taxonomies. I would like to allow users to like or favorite taxonomy archive pages, but I can't seem to figure out any way to do this. Lots of plugins/...
user avatar
  • 11
0 votes
0 answers
82 views

Custom Password Reset

I am building a function that should send the user an email with a password-reset-link in it (I am just using it after registration because I don't want my user to set his password while registrating)....
user avatar
1 vote
1 answer
112 views

Frontend language per user

There is a function of internationalization plugins on WP. If I make .pot files I can translate my plugin to any language. When I install a plugin to website I can choose any language and the plugin ...
user avatar
0 votes
2 answers
41 views

Is there a way to call via javascript if a user is logged-in on a static html file?

I am using Wordpress/Woocommerce for my website along with jekyll (static html generator). I want to change a button based upon user logged in or logged out. \\ if user is logged in <button>Log ...
user avatar
0 votes
1 answer
48 views

WP_User_Query combining role and ids

I would like to get array of all authors (except few), add several admins to it (by ids) and order the array by user names. But I can't find the way how to make it in one WP_User_Query. When I called ...
user avatar
0 votes
0 answers
48 views

How to use the same users table on multiple wordpress sites

I have 3 wordpress sites and I want users to be able to connect to all of them with the same account. The sites are currently in the same domain and everyone has a subdomain. I was wondering if there ...
user avatar
0 votes
0 answers
73 views

Switch to user link shortcode

I am using the User Switching plugin in order to allow sales agents to place an order on behalf of a customer. I have a page called My Customers which uses toolset to return a list of their customers. ...
user avatar
0 votes
0 answers
15 views

Can I add a unique code for each user based on the location?

I am trying to create a unique code for each user based on the location he/she adds when registering. For example: User from UAE: 971-0001 then a user from Egypt: 020-0002 Can this be done? Thank you ...
user avatar
1 vote
0 answers
37 views

Hiding posts by other users and non-logged in

I've been looking for a plugin that works like a private journal and had no luck. The closest I found so far was this guide from buddyforms. In terms of functionality, this is pretty close to what I ...
user avatar
  • 11
2 votes
1 answer
65 views

wp-admin edit user url wont show up correct url [closed]

was expecting the edit url (shot below) would point me to something like: website.co/wp-admin/user-edit.php?user_id=7&wp_http_referer=%2Fwp-admin%2Fusers.php <-- expected url Instead of website....
user avatar
1 vote
0 answers
15 views

Removing all trace of member profiles

I am working on a site that deals with extremely sensitive and personal topics of personal health. As such, it is necessary that having a user account on the site is completely confidential with zero ...
user avatar
0 votes
0 answers
220 views

Query users and count totals based on meta values

Users can choose a value from a multiple choice checkbox on sign up. In this example the choices are Cat or Dog. I have a WP User Query and want to count the amount of users that have each meta value, ...
user avatar
0 votes
3 answers
533 views

Hide custom post type by user roles

I created a custom post type ( Customers ) and i want to show posts of this post type just to the users with Customer role. there is any way without or with plugin?
user avatar
0 votes
2 answers
49 views

Query within a foreach within a query (queryception)

I'm achieving this list in a really roundabout way at the moment and I feel like I should be able to do it with a foreach instead of separate queries for each "House" (House is a CPT and is ...
user avatar
0 votes
1 answer
181 views

Perform multiple actions after wp_insert_user()

I have a custom registration form on my homepage, which runs wp_insert_user correctly. However, after it has created the user, I need to perform the following actions: Log user in immediately Add ...
user avatar
0 votes
0 answers
13 views

My custom user metadata is only active for only admin but i want it to be active on all users especially customers

How can i make custom user metadata which is only active for only admin be active on all users especially customers. Attached are snapshots of the issue.
user avatar
1 vote
1 answer
45 views

How to get a list of all possible values of a specific user meta key?

I have set up my posts with bookmarks where the user's meta will be updated with the post ID of the post they are bookmarking. They are stored in user meta key my-bookmarks as an array. Now I am ...
user avatar
  • 281
0 votes
0 answers
224 views

How to get image path from id using SQL

I want to use a SQL query to get some random users and display an advanced custom fields profile image. Currently with this query I get the image ID back but I somehow from that need to get the url ...
user avatar
  • 105
0 votes
0 answers
30 views

Query posts by post type, author and post meta

Bit of an awkward one here, and there may not be a solutions within current WP core. Basically I have a CPT called "connection" with a custom meta field called "outcome" which ...
user avatar
0 votes
1 answer
362 views

Get user first name from custom endpoint

I am trying to set up a custom endpoint which only returns some user data instead of the default data sent back by the users endpoint. But I don't know how to get the first and last name of the user ...
user avatar
0 votes
1 answer
51 views

Delete all users with Editor role and their content mysql

I have a Wordpress site with thousands of editors. I cant delete them from the WP dashboard as its to slow. I need a query to delete all the editor users and their posts from PhpMyAdmin? Thanks
user avatar
0 votes
1 answer
18 views

Is there a plugin for Wordpress for creating 'Accounts' where all users who belong to that Account can only see Account data? [closed]

Is there a plugin for something where I can group users into an 'Account' and then one particular Account is restricted to seeing only content targeted to that group (therefore a user would need to be ...
user avatar
0 votes
0 answers
35 views

Restricting wordpress login sessions for a web app

I am creating a webgl unity app that sits on a wp site and uses the wp accounts to store data. It works really well, however an issue I have is that currently a user can be logged in on two machines ...
user avatar
0 votes
1 answer
62 views

Nickname field isn't appearing in Admin

I'm getting the following error message when I try to update my user account settings: Your Nickname must be different than your login name. Please choose a different Nickname. But there's no Nickname ...
user avatar
1 vote
1 answer
185 views

List all private pages user has access rights to read

I am trying to list all private pages that user has access to read. To explain in more details, below is the initial setup: Each user has a specific role created and assigned only ability to read ...
user avatar
  • 13
0 votes
0 answers
45 views

Allowing duplicating users with same user_login and user_email

I would need a solution that the system would accept duplicates on user_login. I found a plugin for user_email duplicates, but I also need for user_login. Any idea is welcome, Thanks :)
user avatar
0 votes
0 answers
37 views

Send user auto generated password on different email

On one of my websites, I'm trying to customize different email content like user activation email/new user registration email. Basically, on the activation email, it sends an activation link with the ...
user avatar
  • 103
0 votes
1 answer
209 views

current_user_can() causing critical error

I am writing a function to add a link to the Media Library in the admin menu on front end: function add_media_link_to_admin_menu( $wp_admin_bar ) { // add Media Library to admin menu $...
user avatar
0 votes
2 answers
119 views

Shortcode to update user meta

I want to create a button on the front end and when user click, the value "user-meta" change 'validate' function func_change_validate() { if (is_user_logged_in()) { $current_user ...
user avatar
  • 19
0 votes
2 answers
979 views

change user password REST API

I am trying to let a user change their password via the API. What it looks like here is that I can send a POST request to the users endpoint with their user ID at the end, sending the new password in ...
user avatar
0 votes
0 answers
14 views

Show all post type posts in manage users posts column

In my system I have several users, and each have products and posts under them. In Manage Users page, each user's posts column only counts the posts post-type. How can I add additional post types to ...
user avatar
  • 146
0 votes
1 answer
215 views

Update user role for expired membership

Is it possible to use a function in functions.php that would automatically change user role when a membership goes from status "active" to "expired" ? For example : if an active ...
user avatar
  • 1
1 vote
0 answers
30 views

WordPress API for search

I have a search form for users on my website. I have a custom field called 'location' which is a country dropdown. If I type in a user's name and select a country from the dropdown I see this in the ...
user avatar
0 votes
0 answers
63 views

How to allow access based on the user meta flag

I want to check user meta data and allow access. where I am inserting user_status in wp_usermeta table at the time of Registration. How to validate/verify meta value with password for login. Here is ...
user avatar
1 vote
1 answer
53 views

Limit amout of sessions on user-by-user basis?

I've searched and searched, but to no avail - hope you can help! I'm building a subscription based online training site for a client. The service caters to companies, who will buy access for their ...
user avatar
  • 11
0 votes
0 answers
101 views

Authentication between two different sites using the WordPress login cookie

Two different WordPress, two different users, same account and password. In this case, if the user wants to go to (A -> B) the B site after logging in to the A site, the session HASH is already ...
user avatar
  • 3
0 votes
2 answers
347 views

How to block specific user id in custom login form?

I've been looking for this method for weeks, but still can't find it. There are so many sites that discuss how to create a custom login page, but they don't cover how to block a specific id like the ...
user avatar
  • 3
1 vote
1 answer
74 views

How to Check User type from the form user registers in user_register hook?

I am registering two types of users. Student and Teacher. Student is registered through student registration form (easy registration form plugin) and teacher through teacher registration form(also ...
user avatar
0 votes
1 answer
122 views

Get current user id in function php

I know that this question is already often asked but there is no exact answer for it. I need to get the loggedin user id to change a value in the database for this user. I tried 2 ways it didn't work. ...
user avatar
0 votes
0 answers
80 views

wp_insert_user error

Hi before this I using wp_create_user. It was working properly. Now I change it little bit of my code to use wp_insert_user. I change because i have custom field to set but now I using standard field ,...
user avatar
  • 3
0 votes
1 answer
723 views

how to remove email field from default user registration form on wordpress

Due to some privacy policy i don't want to store user personal information such as First Name, Last Name and Email address in wordpress database. for this I want to signup user with only username and ...
user avatar
0 votes
1 answer
423 views

What is correct way to change user's email?

When a user updates their email address we are seeing that their old email address becomes unavailable to register. This is undesirable. It appears this is based on the user_login and user_nicename ...
user avatar
0 votes
1 answer
254 views

SQL Bulk update all Wordpress user's nicknames to firstname + lastname format

I'm trying to bulk update all my users on one of my Wordpress sites to so that their nicknames aren't the default username but have the format firstname + lastname instead. I've put together this code ...
user avatar

1 2
3
4 5
41