What exactly does “new WP_User()” do?
-
Let us suppose that I create a new WP_User() by
$new_wp_user = new WP_User(null, "(email visible only to moderators and staff)");Am I just instantiating an object from WP_User class or am I really adding a new user to the wp_users table of WordPress?
I need to create fake WP users in my code BUT they should NOT be really stored in WP database: only simulate a list of WP users. Is that possible? -
Hello there,
Many thanks for reaching out.
Are you able to confirm the URL of the website that you need assistance with please?
Also, why are you looking to create a user in this manner?
-
The URL is irrelevant. I am writing PHP code for an intranet site that is not accessible from the web.
I need to create “fake” WP users in terms of PHP objects BUT they should not stored in WP database. It’s a scaffolder.
-
Hi, you’ve landed on the support forums oriented towards helping sites hosted here on WordPress.com. We ask the URL in order to make sure we can help if the site is having issues that we can help with.
As it is, it sounds like your query regards the WordPress software which comes from WordPress.org. You can find their community forums at the link below:
https://wordpress.org/support/forums/
- The topic ‘What exactly does “new WP_User()” do?’ is closed to new replies.