Last active
November 20, 2017 22:05
-
-
Save CorneAussems/52811a2d296bd7664276ebd1e24fccd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//import com.liferay.portal.service.ServiceContext; | |
//import com.liferay.portal.util.*; | |
//import com.liferay.portal.service.*; | |
//import com.liferay.portal.service.impl.*; | |
import com.liferay.portal.kernel.service.ServiceContext; | |
import com.liferay.portal.kernel.util.*; | |
import com.liferay.portal.kernel.service.*; | |
import com.liferay.portal.kernel.service.impl.*; | |
try { | |
companyId = companyId = PortalUtil.getDefaultCompanyId(); | |
sc = new ServiceContext() | |
users = UserServiceUtil.getCompanyUsers(companyId, -1,-1 ) | |
println(users.size()) | |
for(i=0;i<users.size();i++){ | |
user = users.get(i) | |
if(user.getEmailAddress().contains("componence")){ | |
println('User found userId='+user.getUserId()+' screenname:'+user.getScreenName() + ' Lastname:'+user.getLastName()) | |
UserLocalServiceUtil.updateAgreedToTermsOfUse(user.getUserId(),true); | |
} | |
} | |
} catch (Exception e) { | |
println(e) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment