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

How to destory user session if user not active [closed]

how to logout user after 4 hours if user is not active, or closed the browser? all the plugins that should do this kind of tasks are not working
1
vote
1answer
30 views

Remove Capabilities from WP admin for specific user role

I am trying to remove some menu-links capabilities from the wp-admin for a user role called wsm. I have tried many ways and when i just add the code below it will remove those links from the menu for ...
0
votes
1answer
53 views

How to get custom post_author?

I have a post type that inserts email as a post. I also created users according to those emails. This is how I added my post type. $post_array = array( 'post_content' => $mail['...
0
votes
1answer
41 views

How to insert current user ID/entry ID into a shortcode?

I'm wondering if someone can help with a code snippet for the functions.php. I am using a plugin called Connections Pro with the extension Link, which connects the entries to the wordpress user. It ...
0
votes
0answers
27 views

Is it possible with a code snippet to display a green dot on top of every avatar on a WordPress site for each user that is online?

I tried with a plugin but this doesn't show the online status everywhere, only in some places. I want the online status of each user to be visible everywhere there is an avatar, in comments, user ...
0
votes
0answers
17 views

How to display all user profile info in myaccount page wordpress

I was wandering how to display all user profile info in the myaccount page in wordpress. It only shows Name, Email and Password.
0
votes
0answers
17 views

How to add extra field in profile page and show in myaccount?

I need to add an extra input in user profile page and the result is to be shown in the myaccount page, in the Dashboard section. Example: user enters an alias in profile page and this alias appears in ...
0
votes
1answer
19 views

Delete user meta but only if found in array

I created a SAVE button that saves a page's URL to the user meta in an array. I'm trying to now create a REMOVE button but I'm finding that when delete_user_meta is used it deletes all entries in the ...
0
votes
0answers
31 views

Clone wp-admin/users.php (Users Admin Page)

I have created a new page in admin. I need to show all the users in this page(like Users admin page). The reason for this is because i want to show certain custom user roles only on this page. I tried ...
0
votes
0answers
24 views

Get users meta and show to attribute

I have created a registration form (using plugin ultimate-member) for a partner as a salesperson. The key here is: Label : Registration Number Meta : 'regno' Value : X123W So, each new registrant will ...
0
votes
0answers
16 views

Show metadata in users.php - wordpress

is there any way to show metadata in the list of all registered users "users.php"
0
votes
0answers
18 views

wp_delete_user - huge overhead in Buddypress?

I am running a Buddypress Website with 8k Users and I want to create a fresh installation as a base for a new project. I do not want to touch the DB directly because I feel it's dirty and could ...
0
votes
1answer
10 views

Associate multiple email addresses with the same user account, so they can log in with either

Is there a way to associate multiple email addresses (2) with the same user account? The goal is for the user to be able to use their company email or personal email to log into a company portal - ...
0
votes
0answers
10 views

How to display total number of post done by user, it should display at authors page wordpress [duplicate]

I have added the below function to user.php but it cant display the count on the authors page. function count_user_posts( $userid, $post_type = 'post', $public_only = false ) { global $wpdb; $where = ...
1
vote
0answers
17 views

Including users in insert link internal link search in Gutenberg

When I select text and insert a link in WordPress admin using Gutenberg, WordPress searches for internal pages based on the link text. It returns posts, custom posts etc., but not users. I found some ...
0
votes
0answers
30 views

Change wordpress' database data using ajax - how to get current user id?

I want to update a wordpress' database using ajax. I've created php file and included both wp-includes/user.php' wp-includes/pluggable.php' and when I call $current_user = wp_get_current_user(); $...
0
votes
1answer
18 views

Sort new column in Users wp-admin

I created a new column in the Users Admin Tab called "Listings". Each line is a number which means how many Listings an user has. //// ADD THE NEW COLUMN add_filter( 'manage_users_columns', '...
0
votes
1answer
25 views

WordPress 5.8 - Hide or Remove personal fields from admin Profile page

There are several threads on this topic, but none updated to Wordpress 5.8 The question is, in 2021 WP 5.8, what is the cleanest or recommended code to hide profile fields when creating/editing a user,...
0
votes
1answer
22 views

Sort column in Users admin Tab

I created a new column in the Users Admin Tab where it says how many Listings an user has. //// ADD THE NEW COLUMN add_filter( 'manage_users_columns', 'add_listing_count_column' ); function ...
0
votes
0answers
21 views

Need to use Wordpress page as authentication for different service

I am first timer with Wordpress and I would really need help or advice. I have an mobile app service on VPS and client suggested that it would be nice to have singular login info to the App and his ...
0
votes
0answers
15 views

Custom user tables not working after migration

So I have this setup where 2 sites are in the same DB sharing the users and usermeta tables. It worked perfect for months. Now I migrated them to another host. Running a bitnami wordpress stack. Site ...
1
vote
1answer
17 views

How can I check if a user's email exists in the database

When making a registration and saving information in the database I want to check if the user's email has already been registrated. function user_id_exists($user){ global $wpdb; $count = $...
0
votes
1answer
30 views

How to create multiple users at once?

I'm working with a fresh wordpress database and I need to import +250 users at once from xlsx or csv, each user password has to be its name. It is possible to do this on Wordpress?
1
vote
0answers
14 views

Bulk create clean user_nicename from user_email with SQL function

All user_nicenames were replaced with a domain name in botched import. I'm trying to recreate them from the user_email filed but need them cleaned of all special characters ("@" and ".&...
0
votes
0answers
17 views

Get current logged-in user from external site

I have 2 sites, a WordPress site and an external php site (hosted on a subdomain, not in the same directory as WP). I would like the external site to get the current logged in user id, in order to ...
0
votes
0answers
20 views

How can admins to be notified of changes when users change their WP profiles?

I'm using the code below that I found in another thread. When a user makes changes to their profile, this snippet sends an email notification that something has been changed. I'd like to amend this so ...
0
votes
2answers
265 views

New user form rejected because "passwords don't match"—but there's only one password field

I am trying to add a user to a blog of writings by or about my late father.  One of the articles is by my niece, but I cannot add her as a user.  The admin form only has one field for password, but ...
0
votes
1answer
38 views

i need to let a user to add a role from a frontend form

i need to let a registered user who already has role or 2 roles the ability to add himself a role via frontend form. i tried to look for it and didn't find anything related that can help me. any ideas?...
0
votes
2answers
55 views

Allow a user or role to view drafts and previews, but not other admin privileges?

How do I allow a specific user or a specific role to view drafts and previews, but not allow them to edit posts or have any other admin capabilities? I can add a custom capability to a role, but don't ...
0
votes
2answers
55 views

Show only the first 300 words / 50 lines of blog posts for non registered users

Is it possible to show ONLY the first 300 words (or even 50 lines) of every blog post for anonymous users? Instead of show the whole article on the page? And after registration all the post would show....
0
votes
1answer
25 views

How can I clone a suscriber profile in wordpress

Just need PHP code or some way to have a clone button under users like we have code for cloning pages & posts.
0
votes
1answer
20 views

How do I update user email from frontend input field?

I'm using the below function which is working for my phone and address fields. I can't seem to change the email though... any idea what I'm doing wrong? function um_modifications_callback() { // ...
0
votes
0answers
19 views

Woocommerce display orders with products from specific categories to specific admins

I am new at stackoverflow. I have a question about wordpress. I am building a wordpress site for some cinemas with movies. Each cinema is a product category. I want enable an admin cinema1 which will ...
0
votes
1answer
23 views

Storing huge number of users in wordpress

I would begin coding a school management theme project soon and am looking to keep the DB neatly organised. In this pursuit, since the students could be thousands in a school, would it be a good ...
0
votes
0answers
22 views

hide user is currently editing warning in admin post page

i have 2 contributor on my wordpress and as we know whenever any other user edit wordpress post so this type of warning is showing to another users that (jhon(user) is currently editing) but i don't ...
0
votes
1answer
34 views

How to pass a variable between filter/action functions?

In a function fired from filter wp_handle_upload_prefilter, how can I utilise a variable obtained from previously firing action edit_user_profile? My aim: on user-edit.php, when user uploads a file (...
0
votes
1answer
108 views

How to get ID of Edit User page during wp_handle_upload_prefilter, whilst in Media picker?

I have an Advanced Custom Fields field group on Edit User pages (user-edit.php), containing an Image field (avatar). I aim to rename that uploaded filename to match the username of the on-page user. ...
0
votes
1answer
18 views

No more administrator roles / permissions after WordPress upgrade

After a WordPress plugin I can login as admin, but don't have any permissions. $ wp role list is missing the administrator role. What can I do?
0
votes
0answers
15 views

Reading additional fields in PMPro

I am currently working with PaidMembershipsPro, so I wanted to simply add a field with a phone number using register helper and check if the phone number has already been registered on the website. To ...
0
votes
0answers
18 views

How to put the 'assign to new user' select when you delete a user that has custom post type posts, but no normal posts

A client wants to delete some of his users, but since those users have posts of custom post type, but no blogposts per say, the select to reassign the posts to someone else doesn't appear. Is there a ...
0
votes
1answer
24 views

No plugin populate user information in to form

I want to create my own form in order to get information on my site. For learning purposes, I do not want to use a plugin. So, please don't tell me to use one. I know they are easy to use, but I want ...
0
votes
1answer
14 views

Query pages created by deleted users

I need to query all and any pages that are created by either deleted users or users that are no longer users of the website. Here is my query $args = array( 'author' => '0', 'post_type' => '...
0
votes
0answers
28 views

Adding a dropdown on the user admin

I all I'm following this: Add custom column to Users admin panel I need to add a dropdown in the user page (plus+ if I can create the dropdown with values from ACF). The dropdown would be for a ...
0
votes
0answers
12 views

Restrict admins from viewing subscribers admins are not overseeing

On our site, we have user hierarchies. User Admin A oversees users in Group A, User Admin B oversees users in Group B, and so on. We need to ensure User Admin A cannot view users in Group B and vice ...
0
votes
1answer
71 views

How to Use Global Variables Inside Header and Footer

I set global variables for some custom user data in my functions.php to use them in navigation inside header and footer. if (is_user_logged_in()) { # users wordpress id global $user_id_wp; ...
0
votes
1answer
298 views

Users table missing from Database [closed]

I have a functioning WordPress site, with two users (an Administrator and an Editor). I can log in to the WP back-end fine with either user. I can create pages, etc. But when I look at phpMyAdmin, ...
0
votes
0answers
16 views

Users Query Permalink to Post URL

Using Elementor. I have a question, displaying users by roles (subscriber) on page with different user meta fields like image, username and button. Subscribers can add 1 property listing. Now I want ...
1
vote
0answers
32 views

Translate emails into the language of the user

The following scenario: An admin activates a function or similar for a user (in the WordPress frontend). Now the user should be informed about this by email. Therefore an AJAX call is sent to the ...
0
votes
0answers
13 views

How to store multiple user entries

I am trying to figure out how to store user specific data. The user is supposed to insert their weight, the date and then be able to make multiple entries so that each entry can be presented in a ...
0
votes
1answer
35 views

How to get last user with wpdb?

can someone please help me with this query: $ultimousuario = $wpdb->get_var( "SELECT TOP 1 FROM $wpdb->users WHERE user_login = 'usuario*' ORDER BY user_login DESC"); echo "<p&...

1
2 3 4 5
41