java - How to get email addresses of all users in liferay -
i want email addresses of users in liferay...
have used following code..
dynamicquery dynamicquery = userlocalserviceutil.dynamicquery(); dynamicquery.add(restrictionsfactoryutil.isnotnull("emailaddress")); int startoflist = 0; int endoflist = 100; list<user> articles = (list<user>) userlocalserviceutil.dynamicquery(dynamicquery, startoflist, endoflist);
can tell me doing mistake.
i getting:
java.lang.instantiationexception
andcom.liferay.portal.kernel.deploy.hot.hotdeployexception: error registering portlets controlpanelportlet-portlet
.
controlpanelportlet name of portlet.
try code..
list<user> users = userlocalserviceutil.getusers(0, userlocalserviceutil.getuserscount()); for(user user : users) { system.out.println(user.getemailaddress()); }
let me know if have problem
Comments
Post a Comment