title: How to Enable user registration - eJabberd for mac?
body: <p>i am currently working with xmpp to enable chat.
  as<br>
  i refer this link: <a href="http://code.tutsplus.com/tutorials/building-a-jabber-client-for-ios-server-setup--mobile-6958" rel="nofollow noreferrer">link 1</a></p>
  
  <p>so i am sucesfully able to register user from console.
  but i want to register username from my application.</p>
  
  <p>i found some links,<br>
   i also find a solution that" enable user registration in control panel".</p>
  
  <p><a href="https://stackoverflow.com/questions/10257557/methods-for-new-user-registration-xmpp-framework-ios">Solution of a new user register</a>
  here is my trial code</p>
  
  <pre><code>NSMutableArray *elements = [NSMutableArray array];
  [elements addObject:[NSXMLElement elementWithName:@"username" stringValue:@"venkat"]];
  [elements addObject:[NSXMLElement elementWithName:@"password" stringValue:@"dfds"]];
  [elements addObject:[NSXMLElement elementWithName:@"name" stringValue:@"eref defg"]];
  [elements addObject:[NSXMLElement elementWithName:@"accountType" stringValue:@"3"]];
  [elements addObject:[NSXMLElement elementWithName:@"deviceToken" stringValue:@"adfg3455bhjdfsdfhhaqjdsjd635n"]];
  
  [elements addObject:[NSXMLElement elementWithName:@"email" stringValue:@"abc@bbc.com"]];
  
  [[[self appDelegate] xmppStream] registerWithElements:elements error:nil];
  </code></pre>
  
  <p>but not working.</p>
  
  <p>can you please exacly tell me what is the real problem?</p>