Last active
March 9, 2017 12:08
-
-
Save sammso/988d2eea0ead92b29f7a90670186b01b to your computer and use it in GitHub Desktop.
Example script that changes every user password at Liferay DB
This file contains hidden or 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
/*** | |
Example script that changes every user password at Liferay DB to qweqwea | |
*/ | |
var companyId = 20155; | |
var users = Packages.com.liferay.portal.service.UserServiceUtil.getCompanyUsers(companyId, -1, -1); | |
for ( var i = 0 ; i < users.size(); i++ ) { | |
var user = users.get(i); | |
Packages.com.liferay.portal.service.UserServiceUtil.updatePassword(user.getUserId(), "qweqwe", "qweqwe", false); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment