Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Adding Users from Another Application


Vendetta
Participant

@vendetta66

Ok.

For anyone else that may suffer this frustration.

Make sure you include files outside any classes or functions you are calling the wp functions from.

define(‘WP_USE_THEMES’, false);
require_once (dirname (dirname (__FILE__)) . “/community/wp-blog-header.php”);
require_once (dirname (dirname (__FILE__)) . “/community/wp-includes/registration.php”);

Then inside your class method or function you can call the wp function you need to run ie:

$userid = wp_create_user ($username, $password, $email);

echo $userid;

Thanks for everyone’s help.

V

Skip to toolbar