title: moodle new user webservice invalid parameter
body: <p>This is a bit frustrating,</p>
  
  <p>I am trying to add new user using a web service , these are my parameters:</p>
  
  <pre><code>$user1 = new stdClass();
  $user1-&gt;username = "testing";//trim(urlencode(filter_var($_POST['arr']['user_email'],FILTER_SANITIZE_STRING)));
  $user1-&gt;password = "asdL1232";//trim(filter_var($_POST['arr']['user_password'],FILTER_SANITIZE_STRING));
  $user1-&gt;firstname = "testname";//isset($name[0]) ? urlencode($name[0]) : '';
  $user1-&gt;lastname = "testlastname";//isset($name[1]) ? urlencode($name[1]) : '';
  $user1-&gt;email = "tests@gmail.com";//urlencode(filter_var($_POST['arr']['user_email'],FILTER_SANITIZE_STRING));
  $user1-&gt;auth = 'manual';
  $user1-&gt;surname = 'asdsad';
  $user1-&gt;country = 'Israel';
  $user1-&gt;lang = 'he';
  $user1-&gt;idnumber = '';
  $user1-&gt;theme = 'standard';
  </code></pre>
  
  <p>and this is the server response:</p>
  
  <p>"Invalid parameter value detected | ERRORCODE: invalidparameter"</p>
  
  <p>I cannot understand which parameter is wrong...</p>
  
  <p>can anyone help ?</p>
  
  <p>Thanks</p>