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
0answers
6 views

wordpressPCL user meta

I'm using the wordpressPCL library to create new users. I need to insert Meta fields as well, how should I structure this field? private static async Task InserUser() { ...
0
votes
1answer
7 views

Change author base and slug in author link

Hello im trying to change the author link from mysite/author/username to mysite/companies/dataFromUserMetabox i tried the approach from this answer chage author url its working the url changed but ...
0
votes
1answer
7 views

On button click, redirect users to registration page instead of another page

I have a button that I have that leads users to a page on WordPress called /portfolio/, so is there a way that I can redirect users to the /registration/ page until their logged in? I'm using a ...
0
votes
0answers
18 views

meta_query orderby sort multiple keys

I'm trying to read the birthdays of the users in my database through custom fields that have been added. Displaying the current months is easy but I am trying to capture the current month(remainder) ...
0
votes
0answers
14 views

User can hide post just for him

I have a RSS wordpress site so there are many new posts all the time in different categories. I would like a function so that users themselves can hide posts which they don't want to see again. So ...
0
votes
0answers
17 views

Hide menu item when users are logged in/out

I want to be able to hide the 'My account' button when users are logged out and I want to be able to hide the 'Registration' button when users are logged in. How would I go about doing this? I'm ...
0
votes
1answer
11 views

Users activity history

we had some problems in our wordpress web when we changed some issues on the code, and I would like to identify which of the changes made the web crash. I've tried some plugins as Simple History, but ...
0
votes
0answers
14 views

get_user_by() sometimes returns false, but the user exists

I am using child theme and I am replacing the base action for registering a user in my child theme: add_action( 'wp_ajax_nopriv_parent_theme_ajax_register_form', '...
0
votes
1answer
8 views

Editable registration date field in user profile

I'm using this code to display in the user profile backend a field that will show the registration date of the user. When I change the date and hit save, the registration date wont change, it will ...
0
votes
1answer
12 views

Disable emails for new user registration

I want to disable the default email that is send when user is registered. I am using this plugin for email verification User Verification By PickPlugins, which sends an email with confirmation link, ...
0
votes
0answers
17 views

How to prevent users from deleting their accounts?

I'd like to prevent user from deleting his/her account. This is mainly because of our internal rules requiring either two users being deleted at once or none at all. The only way to delete accounts ...
0
votes
1answer
18 views

Echo Text If User Is Logged in But NOT the Author of post

i am coding a plugin, where user can subscribe to a indvidual author of post (like we do on YouTube). I want to display the subscribe link to all logged in users, but not the author of post. my ...
0
votes
1answer
24 views

Searchable Semi Random Number Generator on User Profiles

I'd like it so that when a user creates a profile, there is a custom form that states "ID Number", which is then semirandomly generated. So, for example, if Joe creates an account, he'll be asked a ...
0
votes
0answers
18 views

how restrict user to give star ratings once for a post?

I am creating a plugin where i want to restrict a user to do give ratings to the post but not more than once. function frs_insert_ratings($content) { if(!is_feed() && !is_home()) { global $...
0
votes
0answers
11 views

Create user with sql if it does not exist in wordpress

Forgive me if I'm in the wrong place, I'm digging the Stack Exchange world. This functional sql code creates a user in wordpress: INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `...
0
votes
0answers
9 views

Send registration mail to new user from custom build form

I am using a custom build form connected through an API which has an email field as last field. After that the user presses on a button and the preferences are communicated with the other service. ...
0
votes
1answer
28 views

How to pass external variables to the wp_new_user_notification_email filter?

We're trying to customize the default e-mail new users receive when registering on our website. For this, we are using the wp_new_user_notification_email filter added in WP4.9.0 For our functions.php ...
1
vote
0answers
26 views

Good way to block users within a multisite setup without deleting them?

This is probably a common problem with multiple possibilities to solve. However I am asking for an easy solution as I guess I am not the first one to have this problem. Assume we have a huge company ...
0
votes
0answers
7 views

Is there a way to allow users to customize their feed, i.e. choose what categories they see first when they log in?

I run an aggregator site and want to give people more ways to see what they want. I have it broken down pretty comprehensively by categories and think a tailored feed would make a lot of people happy.
1
vote
0answers
26 views

WP_User_Query by meta_value with Number returns nothing

When querying users with WP_User_Query by meta_value like '23432' (as string or integer) it returns nothing. If searched by text like 'admin' it returns all users where meta_value equals 'admin'. ...
0
votes
0answers
27 views

How to update user meta from php file?

I need to update user meta from php file on my server. Maybe I need some additional permissions? <?php require($_SERVER['DOCUMENT_ROOT'].'/wp-load.php'); $user_id = 1; $new_value = 'http://...
0
votes
1answer
15 views

Filter dropdown in users.php “delete user” bulk edit screen

I recently attempted to delete an administrator user. Using the bulk editor, I selected "delete" and was presented with the option to assign their content to another user. However, the dropdown ...
0
votes
1answer
13 views

Display recent members

I have the following code who should work fine. But Wordpress is crashing. What's wrong? echo "<ul>"; $usernames = $wpdb->get_results("SELECT user_nicename, user_url FROM $wpdb->users ...
0
votes
0answers
7 views

How do i updated auto generate password into the database using custom function into the function.php

How do i updated auto generate password into the database using custom function into the function.php? Currently function updated auto generate password into the database but problem is that unable to ...
1
vote
0answers
15 views

WP users page doesn't show users count by role

I'm running a wp site which have 70.000 users imported from an old vbulletin forum. Everything works well except for an issue I have on the users page in the backend. As you can see in the attached ...
0
votes
1answer
18 views

How do I get the user ID of the user that was updated in WordPress?

I want to run a custom function in my plugin that notifies me of the user that's email has been updated in wordpress backend. But i am not sure how do I get the user ID of that user, since this action ...
0
votes
0answers
6 views

Keep Page hierarchical order on Control Panel when I use 'remove_cap' 'edit_others_pages'

I'm admin user and just created several editor users who are 'NOT' allowed to edit other pages. Let me call them 'master editor','editor A' and 'editor B'. 'master editor' can edit top level parent ...
0
votes
1answer
22 views

How to get user profile information before update?

Currently I can send an email to admin when users update their information using the following (hooking into the S2Memeber plugin): // Email to tell us what user profile for CMM has been modified ...
0
votes
0answers
25 views

Restrict media library uploads by user role

I'm currently using the "user role editor" pro plugin to restrict wp-admin features by user roles. I couldn't find any possibility to restrict media library upload by user roles. What I want is to ...
0
votes
1answer
23 views

How to create front-end (editable) Wordpress user profile pages?

So I am using Gravity Forms to create registration and login forms. But after the user logs in, I want them to be able to see a custom front-end profile page instead of the default Wordpress user ...
0
votes
0answers
24 views

How do I run my custom function in my plugin when a wordpress user is deleted?

I have a custom function in my plugin, I want to run it when any of the wordpress user is deleted so i can know that a user and which user was deleted. I implemented this but it is'nt working. ...
0
votes
0answers
19 views

scripts in Wordpress pages are filtered

I have rich snippet scripts I'd like to place on my wordpress pages, for instance: <script type='application/ld+json'>{"@context": "http://www.schema.org", "@type": "Event", "name":" Reading &...
0
votes
1answer
17 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
0answers
8 views

How users can add custom post type to their own bucket?

I would like any users connected have the possibility to add post to their own category. They can choose the name of this category. Default is bucket. Example : There a 3 posts. Each user can add ...
0
votes
0answers
19 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
1answer
20 views

Wait ajax to complete before continue loop

I'm developing a code that searches for about 5000 orphaned users, and delete them. Using Ajax, how do I wait for a response to complete and then continue the loop? Currently, the loop will keep ...
0
votes
2answers
25 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(!...
0
votes
0answers
17 views

Replace gravatar with user meta, by using filter

In this post, explains how to make my question. It filters user_avatar. I use same way with filtering user_avatar_url for using in <img src=""> Here is my code: function replaceAvatar( $url, $...
0
votes
0answers
30 views

simple click counter for current_user

I am trying to create click counter with Ajax for login users. I have multiple subscriber in the blog and need to count there clicks. HTML: <a id="countable" href="#">Click Counter</a> &...
0
votes
0answers
19 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
0answers
23 views

make a POST public and visible for everyone on a PRIVATE WordPress website

I have a privated my wordpress website. so you need to put the username and password to see the pages and posts of the site. I need to make a post called "Legal Notice" as a public post visible by ...
0
votes
1answer
40 views

Check for empty username or password on login

I'm building a custom login page for clients and wish to keep the wp-login page for site administrators. For checking for empty fields I'm using the code: function verify_user_pass($user, $username, ...
2
votes
1answer
26 views

Why can't I delete original user in multisite? Options for manual removal

So, I've been trying to delete the original user for a multisite installation. After removing the super-admin privileges and setting another user to the network admin, I noticed that hitting the ...
3
votes
0answers
116 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
0answers
22 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
0answers
19 views

Expire User after certain time

Hello i have two custom role on my website (Freelancer and Employer) and i want after 1 year of registration the user have role Freelancer expire user. This is what i want: User subscribe > After 1 ...
1
vote
1answer
191 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
1answer
22 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 ...
1
vote
1answer
40 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 ...
0
votes
2answers
15 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 ...