All Questions
96 questions
0
votes
1
answer
58
views
How to use 2 different databases but share the same user in wordpress
I have 2 wordpress websites on the same server, one is bloo.com and the other is forum.bloo.com. each site has its own database, they have their own wp_content, each has its own file separately, but I ...
0
votes
0
answers
13
views
WP Multisite Users Not Linking
Hi everyone… I’m trying to make a multi site (same site but different languages) and I need it to be available to all users, but when I make an account, it can only log in but has no access to any ...
0
votes
0
answers
116
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();
$...
2
votes
1
answer
6k
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
0
answers
145
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 ...
0
votes
0
answers
196
views
Migrate Users From laravel to wordpress
we used Laravel before , and now we are moving to Wordpress, so we need to migrate all users including the passwords , is this possible?
thanks
1
vote
1
answer
55
views
Some weird users in database
I've noticed that I have some users that seem fraudulent in my database (in the wp_users column). And the curious thing is that they don't appear in the users list in the admin panel.
How could this ...
0
votes
0
answers
81
views
Why User_login key doesn't work with wp_update_user()
I recently was playing with wp_update_user(). I faced an issue while changing the user_login key. Others like user_nicename or other fields change, but user_login doesn't change even everything looks ...
0
votes
0
answers
52
views
How to implement data residency in my WordPress site
I am developing a WordPress multi-site with woo-commerce and subscription plugin. This site will be used in several country like Bangladesh, Australia, United States and Canada.
But I want user’s data ...
1
vote
1
answer
1k
views
Why is it that not all users have a 'session_tokens' meta_key record in the usermeta table?
I've created my own code based on this good article - https://shocksolution.com/2019/04/16/find-last-login-time-for-wordpress-users-in-the-sql-database/ to get the last login date for a user.
I'm ...
0
votes
0
answers
23
views
Display user data in numbered list
We sell a downloadable product. Each download requires registration and those who register for a download are assigned to a user role called "TFWPdownload". The registrants are further ...
0
votes
0
answers
238
views
User input to database
I have given up all hope. Let me start with that.
Goal:
User inputs data into a form (preferable one that looks clean and is scalable across platforms)
User presses submit and the information is ...
0
votes
1
answer
52
views
how add more field to wp user and save it to database
$creating = isset( $_POST['createuser'] );
$new_user_login = $creating && isset( $_POST['user_login'] ) ? wp_unslash( $_POST['user_login'] ) : '';
$new_user_firstname = $...
0
votes
0
answers
104
views
Move Non-WordPress users table to WordPress database
I'm new to Wordpress. I have a users table for my non-WordPress site. Now I want to move my site to WordPress but I have few doubts -
Usually, We can transfer tables by exporting as a CSV file and ...
0
votes
1
answer
2k
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
0
answers
61
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 ...
1
vote
1
answer
90
views
Is there a smart way to obtain a list of only some selected user meta data?
I have a case where, if I had written the DB and queries myself, I would just do something like SELECT name, firstname, email FROM users WHERE .... Returning me a list/collection/array, I mean, not ...
-1
votes
1
answer
66
views
User register hook can't access form request
I'm trying to add a few custom field to the registration form using the code below. After registrations customs fields with keys are created but they don't have any value. I think that my $_POST['...
1
vote
0
answers
294
views
How can i customize the export personal data file?
I want to know is there a way to customize the export personal data page? If you go to wp dashboard > tools > export personal data, you can download an html file which contains your personal data. Is ...
0
votes
0
answers
27
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
0
answers
29
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 ...
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 ...
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 ...
0
votes
1
answer
389
views
create a table using user meta custom data
I am trying to create a table that is populated by the users:
name, points, training completed. All of this data is in the users admin section. Is there a plug in or code I can look at to understand ...
6
votes
1
answer
869
views
How to track user progress?
I'm looking to build a very lightweight learning management system of sorts. I'll have 2 custom post types "Course" and "Lesson". I will associate the Lessons to the Courses, probably by using the ...
1
vote
0
answers
85
views
What Is the Proper Way to Merge Usermeta Table to a an existing WP Database?
I'm currently testing some features on a sandbox environment. I have an existing production website and I'd like to ship my production users and other related tables on new sandbox environment. While ...
0
votes
1
answer
519
views
Combining user database tables while keeping all other data in seperate for multiple sites?
(Multisite is not an option here.) I have five separate WordPress installations, currently residing in 5 separate databases on the same server. My goal is to combine the users for all 5 sites into one ...
0
votes
0
answers
169
views
How to get the id of recently registered user from database?
I just want to get the ID of the recently registered user using my custom created registration form.
Here is my code.
$user_id = wp_insert_user( array ('first_name' =>
apply_filters('...
1
vote
1
answer
58
views
Does Wordpress always create unique passwords?
As you know, Wordpress db has a wp_users table where there is a user_pass field.
Is it possible that two or more different users have exactly the same user_pass value in that field?
3
votes
1
answer
2k
views
How to auto login user again after change user_login
I have a system work by ajax that is change user_login of users and this is my code:
$wpdb->update($wpdb->users, array('user_login' => sanitize_text_field($args['user_login'])), array('ID' =&...
1
vote
1
answer
1k
views
Creating user relationships
I have a project where I feel I need to create relationships between users but since this is not natively implemented in wordpress as far as am concerned then I will need advice on how to do it.
One ...
0
votes
1
answer
18
views
How to save dropdown slection by a user in the DB
I'm having a blog system about cars. I have two main types of articles/posts there. One type is depends on the car manufacturer.
1/Parent category-Car Manufacturer/ Sub categories- Toyota,Honda, ...
0
votes
2
answers
15k
views
How to delete a particular row in a database table
Here I created a custom profile page based on the current logged user to check only his own data inserted in a custom database.
You can see that in every row, I added a button "Delete" missing the ...
1
vote
2
answers
1k
views
Import users from old WP site to new one
I want to import existing users with their passwords from an old WordPress site to a new one. The new WordPress installation has also existing users. Therefore I couldn't simply export/import the ...
1
vote
1
answer
891
views
Modify Database in Multi-Site wp_usermeta table
My name is Antonio and i'm from Ecuador, my english is not good but here we go.
I already have my Multi-site installation working, but the "wp_2_" site have some error in the functionality, because i ...
0
votes
1
answer
242
views
Importing Posts into New Website with Same User ID's
I have to move a WP site into a multisite network as a subsite. This is the current structure:
example.com
-> example.com/site2
-> example.com/site3
Currently, the site that I want to ...
0
votes
1
answer
2k
views
How to get specific table by current user login
I'm using contact form 7 and "save contact form 7".
I want that the logged user see only his own fields.
So, He'll see results only if $reservation->user is equal to $current_user->user_login.
...
0
votes
1
answer
400
views
Does WordPress store the username as a primary key in the database?
Does WordPress store the username as a primary key in the table in the database? I'm wondering why WordPress prevents admins from changing their username and this is the only thing I can think of.
...
0
votes
1
answer
112
views
Users table association with users_metadata table appears broken
I noticed an issue after deploying a custom theme build to a Go Daddy Managed WordPress installation (client's request, RIP) wherein users created by the admin account in the WP back-end weren't ...
0
votes
1
answer
91
views
Wordpress automatic Login on other page?
I have a littlee questions about Wordpress.
If I have several sites on one Webserver and all pages use the same "user table" and "user meta table", can I make if one user login on site one and then ...
1
vote
1
answer
143
views
Change Wordpress prefix for only one table?
I have a little question about Wordpress database.
I want to know: Can I change the wordpress pefix for only one table?
Thet means I use on one Wordpress Page two Prefixes.
If it works how I want to ...
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 ...
1
vote
1
answer
629
views
custom user role wordpress - grant guest access to edit.php without insert/update/delete
I am working on a site where I want to show customers a demo-version of a product.
To do this they can login with a guest-account, I have created this role as follows
add_role('guest', __('Guest'),
...
0
votes
1
answer
623
views
Recovering the table wp_usermeta from users
We had an accident and the table wp_usermeta got truncated.
I have the table wp_usermeta from the staging environment I pushed it in but when I try to login with the admin user (id 1 on both of them)
...
0
votes
1
answer
711
views
update multiple user meta field based on another meta field
I have a user meta field called "user_status" and another called "user_profile_id". The user profile ID is a unique field which is managed manually. It's a 4 digit number. The user_status field is ...
1
vote
6
answers
8k
views
2 Wordpress sites with 2 databases but sharing the same users
I have 2 Wordpress installation: siteA and siteB.
Each installation have their own wordpress database: databaseA for siteA and databaseB for siteB.
What I want is users on siteA can connect on siteB....
0
votes
1
answer
118
views
Storing an array of objects related to each user
I need to store a potentially large array of stdClass objects (houndreds of items) on my various users. Is it safe to use user meta for this, or should I rely on something else?
I could store each ...
0
votes
1
answer
476
views
Is there a way to execute a php script outside Wordpress?
I need to create a script to remove some users from a WordPress DB. I would like to be able to remove those users without modify directly the database and just executing the script.
I would like to ...
1
vote
1
answer
123
views
How can I change the meta_key for a particular piece of information?
I've been adding on to a plugin I'm using that works well overall, but has several issues that I've been having to go in and fix within it's core files.
The issue I'm dealing with right now is trying ...
0
votes
1
answer
2k
views
How to Access wp_usermeta Data Immediately After a New User is Created
I am trying to find a WordPress action hook that will allow me to access a new user's wp_usermeta information, immediately after the user has been created. In our registration process, custom fields ...