<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>How to modify liferay addUser method to autoincrement userId ??</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=21069426" />
  <subtitle>How to modify liferay addUser method to autoincrement userId ??</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=21069426</id>
  <updated>2026-05-27T18:27:35Z</updated>
  <dc:date>2026-05-27T18:27:35Z</dc:date>
  <entry>
    <title>RE: How to modify liferay addUser method to autoincrement userId ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=21092221" />
    <author>
      <name>Tanaji Londhe</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=21092221</id>
    <updated>2013-01-31T09:19:23Z</updated>
    <published>2013-01-31T09:19:23Z</published>
    <summary type="html">How do you add the user programmatically  share that code.&lt;br /&gt;I have done this using following code &lt;br /&gt;http://tanajilondhe.blogspot.in/2013/01/liferay-add-user-programmatically.html</summary>
    <dc:creator>Tanaji Londhe</dc:creator>
    <dc:date>2013-01-31T09:19:23Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to modify liferay addUser method to autoincrement userId ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=21091788" />
    <author>
      <name>piyush liferay</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=21091788</id>
    <updated>2013-01-31T08:58:42Z</updated>
    <published>2013-01-31T08:58:42Z</published>
    <summary type="html">&lt;div class="quote-title"&gt;Tanaji M. Londhe:&lt;/div&gt;&lt;blockquote&gt;Hi Piyush,&lt;br /&gt;You will get companyId using following ways &lt;br /&gt; 1) themeDisplay.getCompanyId();&lt;br /&gt; 2) Company company = CompanyLocalServiceUtil.getCompanyByWebId(&amp;#34;liferay.com&amp;#34;);&lt;br /&gt;      long comapnyId = company.getCompanyId();&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Problem is Not Resolve by both methods of get a companyId......</summary>
    <dc:creator>piyush liferay</dc:creator>
    <dc:date>2013-01-31T08:58:42Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to modify liferay addUser method to autoincrement userId ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=21088013" />
    <author>
      <name>Tanaji Londhe</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=21088013</id>
    <updated>2013-01-31T06:07:30Z</updated>
    <published>2013-01-31T06:07:30Z</published>
    <summary type="html">Hi Piyush,&lt;br /&gt;You will get companyId using following ways &lt;br /&gt; 1) themeDisplay.getCompanyId();&lt;br /&gt; 2) Company company = CompanyLocalServiceUtil.getCompanyByWebId(&amp;#34;liferay.com&amp;#34;);&lt;br /&gt;      long comapnyId = company.getCompanyId();</summary>
    <dc:creator>Tanaji Londhe</dc:creator>
    <dc:date>2013-01-31T06:07:30Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to modify liferay addUser method to autoincrement userId ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=21087419" />
    <author>
      <name>piyush liferay</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=21087419</id>
    <updated>2013-01-31T04:52:39Z</updated>
    <published>2013-01-31T04:52:39Z</published>
    <summary type="html">&lt;div class="quote-title"&gt;Siby Mathew:&lt;/div&gt;&lt;blockquote&gt;Hi Piyush,&lt;br /&gt;If you see UserLocalServiceUtil.addUser(so many params here), you dont need to specify the userId in the params.&lt;br /&gt;Liferay automatically increments the id and adds the user to the DB.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Siby&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;but in addUser method  companyId give null pointer exception how to resolve them.........</summary>
    <dc:creator>piyush liferay</dc:creator>
    <dc:date>2013-01-31T04:52:39Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to modify liferay addUser method to autoincrement userId ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=21071379" />
    <author>
      <name>Siby Mathew</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=21071379</id>
    <updated>2013-01-30T14:24:04Z</updated>
    <published>2013-01-30T14:24:04Z</published>
    <summary type="html">Hi Piyush,&lt;br /&gt;If you see UserLocalServiceUtil.addUser(so many params here), you dont need to specify the userId in the params.&lt;br /&gt;Liferay automatically increments the id and adds the user to the DB.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Siby</summary>
    <dc:creator>Siby Mathew</dc:creator>
    <dc:date>2013-01-30T14:24:04Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to modify liferay addUser method to autoincrement userId ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=21069012" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=21069012</id>
    <updated>2013-01-30T13:33:51Z</updated>
    <published>2013-01-30T13:33:51Z</published>
    <summary type="html">Um, that&amp;#39;s done already...</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2013-01-30T13:33:51Z</dc:date>
  </entry>
  <entry>
    <title>How to modify liferay addUser method to autoincrement userId ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=21069425" />
    <author>
      <name>piyush liferay</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=21069425</id>
    <updated>2013-01-30T13:14:02Z</updated>
    <published>2013-01-30T13:14:02Z</published>
    <summary type="html">How to modify liferay addUser method to autoincrement userId.......</summary>
    <dc:creator>piyush liferay</dc:creator>
    <dc:date>2013-01-30T13:14:02Z</dc:date>
  </entry>
</feed>
