Thanks for you reply.
Problem has been solved...
Code:
PortletRequest portletRequest = (PortletRequest)context.getExternalContext().getRequest();
ServiceContext serviceContext = ServiceContextFactory.getInstance(CreateDRS.class.getName(), portletRequest );
UserLocalServiceUtil.addUser(Long.parseLong(userID), user.getCompanyId(), false, password , confirm_password,false,
firstName, email, "", new Locale("en", "US"), firstName, "", lastName, 0, 0, true, 1, 1, 1970, "", new long[]{10131}, new long[]{10502}, new long[]{10124}, new long[]{10202}, false, serviceContext);
the above "portletRequest" is not working with ServiceContext...
So instead of that I have just create
Code:
ServiceContext serviceContext = new ServiceContext();
And pass it in the UserLocalServiceUtil.addUser() and now it works fine...