Questions tagged [users]

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

Filter by
Sorted by
Tagged with
-1
votes
0answers
15 views

Save user_nicename width capital letters

I have a form for change user profile slug (user_nicename). How to save it in DB with capital letters? If I add "aBCdeF", it will save as "abcdef". $user_nicename = 'aBCdeF'; if ($user_nicename !== ...
0
votes
0answers
43 views

Same userbase on multiple sites

Let's say I already have a site A with some registered users. Now I want to launch a new site B on a different server but I need login/register to work based on site A userbase. Also it would be great ...
-1
votes
0answers
8 views

How to show user's liked posts and collections when the user logs in?

I want to create a plugin which enables a user to like and collect things(posts, links, qoutes, pictures etc) while he/she is logged in and the user would be able to see all his or her liked & ...
0
votes
1answer
33 views

Can i add password field into my wp registration form?

I would like to users can choose their own password on registration form and disable sending generated password email to them. Here it is my custom registration code: <form id="register-form" ...
0
votes
1answer
19 views

What's the correct way to add capabilites to user roles?

A third-party plugin adds the capability 'edit_booked_appointments'. I'd like to assign this capability to the already existing user role 'editor'. I created the following function in my child theme: ...
0
votes
0answers
12 views

Add User in Admin and Redirect to Edit Profile Page instead of Users List

I'm probably missing something super simple, but how can I redirect the admin user to the edit profile page when they create a new user? I've tried to hook into this: edit_user_created_user and then ...
0
votes
0answers
21 views

Disable Wp-Admin For Non Admins By Default, How?

On one of my website, new users (default: subscriber type) cannot access (shows an error) wp admin nor see wp admin bar as default without any plugin or functions.php. But on my other website, new ...
0
votes
1answer
30 views

Using Cloudflare caching on wordpress with front-end user logins

I use Cloudflare heavily on all my sites. On https://pokerdiy.com I use the MyListings Theme which uses an AJAX login and Woo Commerce. The user never sees the default wordpress dashboards and control ...
0
votes
1answer
29 views

Append USER ID to an outbound link?

Please bear with me as I am a newbie. Is there a way to append a USER ID aka a logged-in user's ID to any external link. For example, a logged-in user clicks a link, the link then appends that user'...
0
votes
0answers
17 views

Wordpress doesn't allow me to create new users

I have a weird error on my wordpress site. When I try to create a new user it says: ERROR: This username is already registered. Please choose another. ERROR: This email address is already ...
0
votes
1answer
23 views

How can get the last post date of the user?

I want to get the last post date was written by the user and here's the code that I have made but it's not working: function get_user_last_post_date( $user_id ) { $args = array( '...
2
votes
0answers
32 views

How wordpress retrieves user info?

The WordPress function wp_get_current_user() uses the global variable $current_user to get the get current logged-in user info. What I would like to know is, how does WordPress retrieve the data ...
0
votes
1answer
20 views

User updating their profile wipes my custom fields

I have created a plugin to add extra fields to user profiles. These fields can only be edited buy admin and do not show on the user'profile page. The extra fields are shown and can be edited by admin. ...
0
votes
1answer
38 views

How do I have now a duplicated user entry if this is not allowed (and I cannot replicate it)?

In my website I have users registering with the email as the username If I try to manually add a new user and I use a username (which is a mail) that already exists, WP complains and tells me that ...
0
votes
1answer
14 views

How to hide user profile fields based on the role of the viewed user?

I want to hide some default fields of the backend user profile page based on the role of the user whose profile is being viewed (by the admin in this case). I used the simple CSS way to achieve that (...
0
votes
1answer
21 views

User capability for editing their own comments

I'd like to allow certain (logged in) users to be able to edit their comments. I don't care if they can only edit through the back-end - obviously front-end editing would be lovely, but I'm willing to ...
1
vote
1answer
28 views

Redirect user after successful email change

I set up a front end form for logged in users to update their email address. So far it is working however I want the user, after confirming the email change via link sent to the new address, to be ...
1
vote
1answer
21 views

Show MD5 Password in user section

Im trying to show the MD5 Password of the users as you see them in the database but in the users table as an extra column. I have previusly done with the ID like this: add_action( '...
0
votes
1answer
14 views

Deleted users still able to login

I have deleted all users in backend. However, they are still able to login and access the site. How can I permanently delete them? Thanks
1
vote
1answer
13 views

Import wp users via one click demo option

I have created a WordPress theme and added an option to import demo data in which I have added WordPress posts, pages, customize options. when my client buy the theme and use one-click demo option to ...
1
vote
1answer
38 views

Suddenly all emails in User have [email protected]

I don't know what happened but suddenly all emails under "User" are changed to [email protected] - see the below picture. Of course, my first thought was a plugin problem, but when I disable ALL ...
1
vote
1answer
41 views

How can I add data to a custom column in the Users section of the wordpress backend?

Can anyone help me with adding data to a new User table column that I added? In the wordpress backend, in the Users section, I added a custom column called "Last Name". Now, I'd like to add last ...
3
votes
1answer
48 views

How can I run a WP-CLI command as authenticated user?

I've written a command for wp-cli called wp nurse. It is styled after the wp doctor command, except is meant to run the WordPress Site Health checks. Using the in-browser tool, all 16 tests currently ...
2
votes
2answers
22 views

how do i get a greeting for logged in uses by the time of day

hi i am looking to combing to pieces of code into 1 both work but not together keep no matter what i try it keeps crashing the site <?php $t=date("H"); if ($t<"12") { echo " Have a good ...
0
votes
0answers
22 views

Quiz time! Is there a way to restrict an editor's editing permissions so they can only edit posts by specific contributors?

We're spinning up a new team of writers, with a new editor. I want the new editor to be able to edit posts created by the new team. But I don't want the editor to be able to edit existing posts, or ...
1
vote
0answers
20 views

How to verify wp user password by sql query in wp? [closed]

I want to verify the user password without function only by the SQL query.
1
vote
1answer
5 views

Adding New Users to Your WordPress Site for edditign only one page

We are an office in The university business incubator as one company and in site of the university, so i want to know is there any module to creating restricted account only for only editing one ...
1
vote
0answers
24 views

Are there mutiple ways to get usernames (as a hacker)

I built a new site and forgot to protect against the "?author=n" technique. I had 2fa on all accounts so no hacker got access to the site's admin. I've since fixed that security issue. Is there ...
0
votes
1answer
17 views

How to create page for user?

I'm using author.php to display all user and their info. I would like to add a separate page like this : domain.com/users/user_name/ABOUT Is there a way to add a page (ABOUT) and retrieve info of ...
2
votes
1answer
25 views

SQL User Query by Multiple Roles using PHP

I can successfully get all my WordPress users using the following code: global $wpdb; $sql = 'SELECT * FROM ' . $wpdb->users; $users = $wpdb->get_results( $sql, 'ARRAY_A' ); However, I need to ...
1
vote
1answer
20 views

'Users' and 'Appearance' have disappeared from dashboard menu [closed]

Recently when I logged in to edit my website, the Users and Appearance menu items had disappeared from the left hand menu from within the dashboard. Any idea why or how I get them back?
0
votes
1answer
28 views

Check if current user has a post and that post has any term/s from a specific custom taxonomy outside the loop

I'm looking for a way to check if (whilst outside the loop) the current user.. 1. is logged in 2. has a post published 3. their post has any term/terms from a custom taxonomy I have this so far... &...
0
votes
0answers
145 views

Create user with ACF custom fields via REST API

I'm unable to create a User via the WordPress REST API when I include custom fields within the payload. I have 2 custom fields on the User object, created with ACF: phone_number (string) state (...
1
vote
1answer
38 views

Change the Labels of Users to Customers in Admin

Ok, I've been searching for over an hour for something I thought (and still think) is pretty simple. I need to change the title Users to Customers in the admin for a client. I can and have easily ...
0
votes
0answers
18 views

Change user_nickname for author page link

I have a page where user can change their personal info. Now I want to give them a possibility to change their personal page link by changing theire user nickname. So I want to create simple form with ...
4
votes
1answer
63 views

Why does is_user_logged_in() return false after redirect from another site?

I am developing a WordPress site that redirects to an external payment gateway after a user registers for the site. After the user makes a payment the user is redirected to a page to complete their ...
0
votes
0answers
18 views

Store data from JavaScript object to custom table in user account

When a user is logged into WordPress, I want to be able to store data coming from a JS query into a custom table of the user in WordPress. I want to show this data when the user goes to their user ...
1
vote
1answer
26 views

Remove all users from site except one using WP CLI

I would like to remove all users from WordPress site using WP CLI except one (me, as administrator). This command remove every user: wp user delete $(wp user list --field=ID --number=10) ...
0
votes
0answers
14 views

add image uploader field for users without plugin

i have made signup form in custom template. I'm trying to allow users to upload a profile image on their user profile editing page, thanks in advance. kindly help with code step by step. i have ...
0
votes
1answer
19 views

Post Taxonomy Value get from User Field Value

I have user field such as "gender and country" on register form (Created with ACF). Also I have post (wp default posts and CPT) taxonomies called "gender and country My member can create unlimited ...
1
vote
1answer
24 views

Check if someone is editing a post (this content is currently locked)

I'd like to create a kind of auditing. How can I check if an user is modifying an article? Is there a db query I can do to achieve this task? I've found the following solution but I wonder if there ...
0
votes
0answers
15 views

Get URL of logged in user's custom post

I'm running a multi-vendor WP site where users can create a business profile. The profile is a custom post type (wyz-business). I'm looking to get the URL of logged in user's profile (custom post ...
0
votes
1answer
59 views

Why get_user_by() doesn't work in my code?

I am editing the code of a plugin to add a small functionality that I need. I almost made it work, but I really struggle and don't understand why $user_id_for_um_groups = get_user_by( 'email', $...
0
votes
1answer
27 views

Web app vs CMS backend

My company that I work with would like me to investigate how I might go about creating a system in the back end of our website that our employees can you use to help speed up their workload. I am by ...
2
votes
0answers
44 views

In MultiSite, can some users automatically have Site Admin rights on all sites, without granting them Network Admin access?

We have some "content specialists" that we'd like to effectively grant Site Admin access to every site on our network automatically, but still don't want them to be able to access the network admin ...
0
votes
0answers
16 views

Hook into form handle from admin users table

I'm adding a couple of buttons to the user table in a custom column, in which, on click will need to either approve or reject the user via update_user_meta. I've tried hooking in with profile_update,...
-1
votes
2answers
11 views

Some Admin disappeared

Last week I added WooCommerce and YITH (catalog mode). All seemed fine. Today, I log in and I no longer see (in the left admin sidebar) the following items/tools: ‘Appearance’ (with theme and such) ...
-1
votes
1answer
16 views

Wordpress User Portal

So I work for a small developer who does some of their lightweight web projects on wordpress. We're searching for a plugin that would allow non tech-savvy people to easily make new posts and pages ...
1
vote
0answers
9 views

What is proper way to store info such as user marking a post as favorite? In post meta or user meta?

I have custom post types such as course, lesson, and lesson_topic and I have ajax call to mark a lesson_topic as favorite for a user. I am currently doing this in the ajax handler: function ...
0
votes
1answer
43 views

Querying specific table row by current user login

I m creating a user based website in Wordpress, where each users can create an account and upload data of their records into the website. But I m having trouble thinking of how users can view a ...