I am using wordpress and I’ve created a new table in the wordpress database.
I have created a new table which contains a userid field
My question is, is there anyway to make a copy save/sync wordpress’s user table user_login field into my new table so that every time there’s a new user my table is also populated with the user_login field?
Well, to make a one time copy of the
user_loginfield into your new table, you would do this:Now, if you want to replicate the
user_loginautomatically whenever a new user is created, you should look into creating a trigger.Read those on how to create a trigger: