title: when using add_user_to_blog getting error "Call to undefined function get_userdata"
body: <p>I am working on WordPress MU and trying to build one plugin to add user to multiple sites. so far did everything to loop through sites.  But while assigning user to site as below using add_user_to_blog am getting error see below.</p>
  
  <p>add_user_to_blog( $blogid, $amsuserid, $urole );</p>
  
  <p>Getting the following error:</p>
  
  <p>Fatal error: Call to undefined function get_userdata() in wp-includes\ms-functions.php on line 181</p>
  
  <p>if I disable the line "add_user_to_blog" no errors.</p>