[wp-hackers] Role settings using WP_User class
Francesco Terenzani
f.terenzani at gmail.com
Wed Oct 18 09:49:06 GMT 2006
Hi wp-hackers,
I'm going to make a plugin that have to adds some users.
I have a function that look like this:
function add_user($id){
$user = new WP_User($id);
$user->set_role(get_option('default_role'));
}
but this function return the fatal error:
Call to undefined function: get_userdata() in
mypath\wp\wp-includes\functions.php on line 2259
evreyone know what is the problem?
thanks,
Fra
More information about the wp-hackers
mailing list