Questions tagged [users]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
132 views

Allow admins to login as other users

My question is about WordPress in general. How can I give admins the ability to log in and do things that other users can do? My specific use-case for this is, in WooCommerce, when an admin creates ...
0 votes
0 answers
28 views

Is there a way to save different data when USER interacts with the same POST?

I would like a kind of relationship database without create database because I’m not very confident with it. So I think about an alternative using Wordpress default features like posts, categories ...
0 votes
1 answer
6k views

WordPress REST Api: update user

I have created an user via wordpress api, then after registration, I save user's username and password into the sessionStorage, and then, finaly, try to edit user's profile. Here's my post request ...
0 votes
1 answer
175 views

Cloning admin pages like users.php

In my project I want to make a new menu position which will be actually a copy of 'Users' page but with some additional filters/modifications. For example as a result I need to have another menu ...
0 votes
2 answers
39 views

Want to add post to user dashboard

I would like to add edit.php to user dashboard who registers as subscriber on a website. Code which i using is add_action( 'admin_menu', 'remove_menus' ); function remove_menus(){ if(!...
1 vote
1 answer
3k views

Force user to change their password on first log in of site using shortcode

I'm working on a WP 4.9.8 and looking for a script to force users to change their password on their first viewing of the site. It's an enterprise website, users are added by import of a csv file with ...
0 votes
0 answers
130 views

WP users cant reset password

I had users complains that they forgot their password, and after they changed and being accepted, when they try to login they get pass error. I tested it and i confirmed that the changed pass is not ...
0 votes
1 answer
47 views

restrict admin panel sections to users

I have found out how to disable wordpress admin menu items from users other than administratos. What I would like to achieve now is every user can access only his user page (only "Your profile") and ...
6 votes
0 answers
1k views

WordPress REST API call generates nonce twice on every call

I'm trying to login a user via the REST API, and then retrieve the current user on subsequent requests. As per the documentation, in my plugin, I am creating and retrieving a nonce after a successful ...
1 vote
0 answers
561 views

user_profile_update_errors hook not executing

I'm trying to use the user_profile_update_errors hook, however it doesn't appear to be executing. I'm calling it like this: add_action('user_profile_update_errors', 'blm_register_result', 10, 3); ...
0 votes
1 answer
138 views

How to copy user_nicename value into user_login

a hacker put value "admin" into all user_login fields. i need to copy user_nicename value into the user_login so users can login. is there a SQL command i can run to do this task in bulk, as their ...
3 votes
1 answer
4k views

Changing user_nicename

user_nicename has the same value with user_login. I want to change user_nicename value only by using code snippet into functions.php or wp-config.php. Is it possible without using phpmyadmin or any ...
10 votes
3 answers
11k views

Whats the best way to share user data across multiple Wordpress websites?

First of all, Multisite isn't what I'm looking for. I have 5 websites using Wordpress all on separate domains that I would like to enable user accounts for. I need user data to be shared across the ...
0 votes
2 answers
451 views

User meta query results in PHP notice: only variables should be passed by reference

I am using a URL rewrite to put the user's display name in the URL to display a user profile. This part all works fine and the proper value is passed through the query_vars and I can get the correct ...
0 votes
0 answers
372 views

Wordpress user ID prefix

Anyone know of a way to add a prefix to the WordPress user ID when the user registers via WooCommerce checkout? This new user ID format would need to be stored in the WP database in the default user ...
0 votes
1 answer
302 views

How would I be able to use a font awesome icon as a user's avatar?

Would it be possible to use/allocate a font awesome icon as a user's avatar?
0 votes
0 answers
522 views

Wordpress: Issue with filtering users using date range

I'm trying to add a date range filter for wordpress admin users table to filter users that have posted ads between the selected range. I've managed to add the date range inputs. I have 2 issues with ...
0 votes
1 answer
713 views

Cross origin ajax request always returns 0 when calling get_current_user_id();

I currently work on localhost and when I want to test ajax requests to my web server, the function get_current_user_id() always returns 0. When I make the ajax request from my website however, it ...
2 votes
1 answer
324 views

New user notification doesn't include activation link

When adding new users through the Dashboard, I've noticed that the notification email sent to a user when then have been added to Wordpress doesn't work correctly. Included in the email is the ...
16 votes
3 answers
27k views

Change the Author Slug from Username to Nickname

Hi to the community, is it possible to change the default username slug to nickname if is available? By default the url is something like: http://domain.tld/author/(admin) , is it possible to ...
0 votes
1 answer
36 views

How to display particular categorie's post which associated to specific user?

How to display particular categorie's post which associated to specific user? http://tugsemegtei.mn/category/fish/ Above link displays all the posts under fish category, but how can I display only ...
0 votes
1 answer
48 views

How do I tag every author in their posts that they have made previously

So here is the situation, I have a wordpress blog site that is a few years old, and every user had a different account to post with. Now what i want is a plugin/script that automatically adds the ...
0 votes
1 answer
230 views

How to query users by post count no less than 10

I want to display 5 users by random who have published more than 10 posts but is not working. What I've done so far is $args = array( 'number' => 5 , 'meta_key' => 'post_count',...
0 votes
1 answer
244 views

How to query 5 users in random who have published more than 10 posts

I want to display 5 users who have published more than 10 posts, when the page loaded again, it should show another 5 users or mixed with new users with more than 10 posts. How do I achieve this? ...
1 vote
2 answers
5k views

First and last name fields not filled when using wp_insert_user

I've written a plugin to allow authentication to a WordPress install via an external API. Everything is working except the first and last names are not being set for the new WordPress user created by ...
2 votes
2 answers
5k views

User role permissions based on taxonomies

I was wondering if it's possible to set up user roles in a way that means that users in certain groups can ONLY edit posts that have a specific taxonomy assigned to them e.g: Properties (Post Type) ...
11 votes
5 answers
37k views

How many users can WordPress handle?

I want to design a member login site in WP but I have a doubt that is WordPress can handle more than 40000 users on same database? I am not sure about this so I am stooping my work here. So please ...
0 votes
1 answer
123 views

How to get the count

How to get the count of the WP_User_Query result while I use $query = new WP_User_Query( $args ); echo count($query); It returns 1 when there is no user. But I need 0 in that case. How can I get ...
0 votes
1 answer
339 views

How to avoid duplicate users when I am using get_users?

I using get_users to get users from my database. I am using this code: $args = array ( 'role' => 'Colaborador', 'role__not_in' =>[ 'subscriber', 'Administrator'], ...
1 vote
1 answer
4k views

How to get current post user id

I have some posts, each post have different authors(users). I save each author image avatar in user_meta table. Now i want show each author avatar in self posts. i get user_id with ...
0 votes
3 answers
1k views

How to count total words for posts published by one author?

How can I get a total word count of one author's posts? Thanks. To be more clear, I wanna show the total word count in the author archive page, preferably using code.
1 vote
3 answers
526 views

Redirect users based on custom field

I'm a novice at Wordpress and i'm pretty sure what i'm looking for is really easy. I have an issue with a function that doesn't work : function user_homepage() { if ( is_user_logged_in() ) { ...
1 vote
1 answer
2k views

How to change user starting role in WordPress MultiSite?

I am using WordPress MultiSite. Where can I change user starting role? It does not show under Settings > General > New User Default Role.
0 votes
1 answer
294 views

Didn't get array of users like in delete action WPList table in users tab

I am adding a bulk action assign just like delete. add_filter( 'bulk_actions-users', array( $this, 'add_bulk_action' ) ); /** * Add Bulk Assign Action. * @param array $actions Current ...
1 vote
1 answer
8k views

Custom User Profile Fields

I have add new columns on wp_users and in /wp-admin/user.edit.php I add new fields and connect this to database, so if I put data on the database manually, the new fields recive that, but if I update ...
0 votes
1 answer
227 views

Is there any action /filter hook I can use to disable login for some user role?

I want to block user role called "pending" loging to the site. (pending is a custom user rolled created by me). Is there any action/filter to block all users who are in "pendin" user role?
0 votes
1 answer
312 views

Create relationships between users or user roles

I have a site where doctors and patients are registered. It provides services like where patients (role-patient) are registered themselves and after my support person (role-support) assign that ...
1 vote
0 answers
211 views

WP_User_Query - searching multiple fields

I have a search engine where I can search for users on the front end. Profiles have mulitple custom fields. I'm just searching first and last name in this example. The problem is I can search for a ...
0 votes
1 answer
401 views

Possible to have duplicate usernames on different two multisites

I have a multisite set up with two sites setup: example.com/site01 example.com/site02 With both sites, they are using the same custom theme which generates a default list of users (publisher01, ...
0 votes
1 answer
33 views

Use WP user status (logged_in) to manage access to independent application

I have WP installed in the root of my website. In the same directory there’s a completely independent application. What I want to do is the following: when the user accesses the page containing the ...
1 vote
1 answer
202 views

Disabling user capability to edit_posts or delete_posts in the front-end

I've created a post edit form in front-end of the site, this form is accessible on the front-end ONLY if the user is logged in. Now, for some reason, upon a certain condition is met, I want to DISABLE ...
0 votes
1 answer
81 views

Redirect /member/ to /member/user

Is it possible if an user is loggued to redirect /member/ to /member/user ? (User is the display_name) If yes, how can I do this ? Thank you ! :) thanks to Jack, I tried to search on google "Wp-...
0 votes
1 answer
50 views

I've removed my /author/ slug but it clashes with new and existing pages. Any fixes?

I've successfully removed my author slug using this tutorial: https://wp-snippet.com/snippets/remove-author-prefix-from-slug/ so it's like website.com/author/cixxy to website.com/cixxy My question ...
0 votes
0 answers
237 views

Merge wp-query and get_users

Is there a way of merging get_users() and and WP_Query() into one query so I can paginate the results? I have two entities; users and companies. Both can be members but users are users and company is ...
0 votes
1 answer
253 views

Change page password every day (predictable password ;) )

I've got a WP page containing a survey. The survey will be accessed by different people everyday (for simplicity say everyday for the whole year). I would like to password protect it and the password ...
0 votes
0 answers
331 views

Add another role to a user when they click a button?

On my site, there are roles "user, authors, etc.". Default role for user is "User" which I want to keep it for all users. How to add another role to a user when they click a button? I tried with my ...
0 votes
1 answer
474 views

Simulate Update User button click

I have a site running Paid Membership Pro and I'm adding a user membership level via a Webhook from Chargify. I use a function in the Stranger Studios Multiple Memberships Per User plugin https://...
4 votes
3 answers
3k views

Extending WP_User class and using this sub-class during the whole lifecycle

What I am trying to achieve is the following: for every user on our website, I want to do an API request to a service (local REST API interacting with another database) once and then cache the result ...
0 votes
1 answer
1k views

How can I store user preferences in WordPress and retreive them later?

I have a WordPress website where I want to give users some options to sepcify how they want to see the site. For example, they can choose from a given set of fonts, menu color etc. I am assuming this ...
9 votes
3 answers
4k views

How to bulk delete all users with no posts?

I have 10 thousand of users about 98% of these users never published a post (i mean post not comments). I need a way to mass delete users with 0 posts. The method must count all posts included ...

1
14 15
16
17 18
42