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.*; | |
import com.liferay.portal.kernel.util.GetterUtil; | |
import com.liferay.portal.util.*; | |
try{ | |
serviceContext = new com.liferay.portal.service.ServiceContext() | |
long companyId = PortalUtil.getDefaultCompanyId() | |
employee = com.liferay.portal.service.UserGroupLocalServiceUtil.getUserGroup(companyId,"EMPLOYEE"); | |
fired = com.liferay.portal.service.UserGroupLocalServiceUtil.getUserGroup(companyId,"FIRED_EMPLOYEE"); |
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
alert('Hi there this is not wat you want at all'); | |
window.location='https://www.hackthissite.org/'; |
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
0x0802F3B93AbaE22c72dfc9E0a269dee407FE29d8 |
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.*; | |
try { | |
companyId = companyId = PortalUtil.getDefaultCompanyId(); | |
sc = new com.liferay.portal.service.ServiceContext() | |
users = UserServiceUtil.getCompanyUsers(companyId, -1,-1 ) | |
println(users.size()) |
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.kernel.search.IndexerRegistryUtil; | |
import com.liferay.portal.kernel.search.Indexer | |
import com.liferay.portal.model.User | |
import com.liferay.portal.util.*; | |
import com.liferay.portal.service.* | |
import com.liferay.portal.service.ServiceContext; | |
try { | |
long companyId = PortalUtil.getDefaultCompanyId(); | |
User user = UserLocalServiceUtil.getUserByScreenName(companyId, "sasupport" ); |
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.model.User; | |
import com.liferay.portal.util.*; | |
import com.liferay.portal.service.*; | |
import com.liferay.portal.service.ServiceContext; | |
import com.liferay.portal.security.permission.*; | |
try { | |
long companyId = PortalUtil.getDefaultCompanyId(); | |
User user = UserLocalServiceUtil.getUserByScreenName(companyId, "sasupport" ); | |
out.println("User:"+user); |
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.security.ldap.*; | |
import com.liferay.portal.util.*; | |
long companyId = PortalUtil.getDefaultCompanyId() | |
try{ | |
String ids = PrefsPropsUtil.getString(companyId, "ldap.server.ids"); | |
out.println(ids); | |
// IDS to long |
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
### PROBLEM with array of primitives !!! | |
import com.liferay.portal.kernel.util.GetterUtil; | |
import com.liferay.portal.util.*; | |
long companyId = PortalUtil.getDefaultCompanyId() | |
long userid = 29254644; | |
try{ | |
groups = com.liferay.portal.service.GroupLocalServiceUtil.getLayoutsGroups(companyId,0,true,-1,-1) |
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 org.apache.commons.httpclient.*; | |
import org.apache.commons.httpclient.methods.*; | |
import org.apache.commons.httpclient.params.HttpMethodParams; | |
import java.io.*; | |
try { | |
// Create an instance of HttpClient. | |
HttpClient client = new HttpClient(); |
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
############################ | |
##### Removing SPIDP ###### | |
############################ | |
import com.liferay.portal.template.*; | |
import com.liferay.portal.util.*; | |
try{ | |
long companyId2 = PortalUtil.getCompanyId(actionRequest) | |
customLocalService = ServiceLocator.getInstance().findService('saml-portlet', 'com.liferay.saml.service.SamlSpIdpConnectionLocalService') |