|
A new file,
import.php
:
'jdoe', 'user_pass' =>
'foobar');
$user_id = wp_insert_user($userdata);
Check
wp_insert_user()
for other possible fields. Run
update_usermeta()
for any additional needed meta fields. (Including user level, though there may be convenience functions.)
Note that here at work we redefine the
wp_authenticate()
function (it's in
pluggable.php
, so it can be replaced by defining it in your own plugin) and creating user accounts on-demand if they don exist at login time.
|