title: Drupal 7 New User Creating programmatically?
body: <p>Drupal 7 i need to crate New User with the Code (not via the Panel manually).</p>
  
  <p>When i test with this chunk of example code i googled, in the Drupal:</p>
  
  <pre><code>$form_state = array();
  $form_state['values']['name'] = 'robo-user';
  $form_state['values']['mail'] = 'robouser@example.com';
  $form_state['values']['pass']['pass1'] = 'password';
  $form_state['values']['pass']['pass2'] = 'password';
  $form_state['values']['op'] = t('Create new account');
  drupal_execute('user_register', $form_state);
  </code></pre>
  
  <p>It showing: <code>Fatal error: Call to undefined function drupal_execute() in ......</code></p>
  
  <p>How can i make it work or any other simple way like above?</p>