[wp-hackers] Adding Users via plugin

Matt Mullenweg m at mullenweg.com
Sun Oct 23 18:19:55 GMT 2005


Pat Cavit wrote:
> My question would be: is there a better way to do this?  I'm looking
> into output buffering and faking POST data so that I can include
> users.php into my plugin and have it register people via the official
> WP codepath but it still seems pretty gross.  Is there any sort of
> cleaner interface/method of registering a user inside of a plugin?

In 1.5 that's probably the easiest way, but in 1.6 we've encapsulated 
this in a function (wp_create_user) that should make your life easier.

-- 
Matt Mullenweg
  http://photomatt.net | http://wordpress.org
http://pingomatic.com | http://cnet.com


More information about the wp-hackers mailing list