public class UserLocalServiceImpl extends UserLocalServiceBaseImpl
Modifier and Type | Field and Description |
---|---|
protected com.liferay.mail.kernel.service.MailService |
mailService |
announcementsDeliveryLocalService, announcementsDeliveryPersistence, assetEntryFinder, assetEntryLocalService, assetEntryPersistence, blogsStatsUserFinder, blogsStatsUserLocalService, blogsStatsUserPersistence, browserTrackerLocalService, browserTrackerPersistence, companyLocalService, companyPersistence, contactLocalService, contactPersistence, counterLocalService, dlFileEntryFinder, dlFileEntryLocalService, dlFileEntryPersistence, dlFileRankFinder, dlFileRankLocalService, dlFileRankPersistence, expandoRowLocalService, expandoRowPersistence, groupFinder, groupLocalService, groupPersistence, imageLocalService, imagePersistence, layoutFinder, layoutLocalService, layoutPersistence, mbBanLocalService, mbBanPersistence, mbMessageFinder, mbMessageLocalService, mbMessagePersistence, mbStatsUserLocalService, mbStatsUserPersistence, mbThreadFlagLocalService, mbThreadFlagPersistence, membershipRequestLocalService, membershipRequestPersistence, organizationFinder, organizationLocalService, organizationPersistence, passwordPolicyFinder, passwordPolicyLocalService, passwordPolicyPersistence, passwordPolicyRelLocalService, passwordPolicyRelPersistence, passwordTrackerLocalService, passwordTrackerPersistence, persistedModelLocalServiceRegistry, ratingsStatsFinder, ratingsStatsLocalService, ratingsStatsPersistence, recentLayoutBranchLocalService, recentLayoutBranchPersistence, recentLayoutRevisionLocalService, recentLayoutRevisionPersistence, recentLayoutSetBranchLocalService, recentLayoutSetBranchPersistence, resourceLocalService, roleFinder, roleLocalService, rolePersistence, socialActivityFinder, socialActivityLocalService, socialActivityPersistence, socialRelationLocalService, socialRelationPersistence, socialRequestLocalService, socialRequestPersistence, subscriptionLocalService, subscriptionPersistence, teamFinder, teamLocalService, teamPersistence, ticketLocalService, ticketPersistence, userFinder, userGroupFinder, userGroupLocalService, userGroupPersistence, userGroupRoleFinder, userGroupRoleLocalService, userGroupRolePersistence, userIdMapperLocalService, userIdMapperPersistence, userLocalService, userPersistence, workflowInstanceLinkLocalService, workflowInstanceLinkPersistence
Constructor and Description |
---|
UserLocalServiceImpl() |
Modifier and Type | Method and Description |
---|---|
com.liferay.portal.kernel.model.User |
addDefaultAdminUser(long companyId,
String screenName,
String emailAddress,
Locale locale,
String firstName,
String middleName,
String lastName)
Adds a default admin user for the company.
|
void |
addDefaultGroups(long userId)
Adds the user to the default groups, unless the user is already in these
groups.
|
void |
addDefaultRoles(long userId)
Adds the user to the default regular roles, unless the user already has
these regular roles.
|
protected void |
addDefaultRolesAndTeams(long groupId,
long[] userIds) |
void |
addDefaultUserGroups(long userId)
Adds the user to the default user groups, unless the user is already in
these user groups.
|
void |
addGroupUser(long groupId,
long userId)
Adds the user to the group.
|
void |
addGroupUser(long groupId,
com.liferay.portal.kernel.model.User user)
Adds the user to the group.
|
void |
addGroupUsers(long groupId,
List<com.liferay.portal.kernel.model.User> users)
Adds the users to the group.
|
void |
addGroupUsers(long groupId,
long[] userIds)
Adds the users to the group.
|
void |
addOrganizationUser(long organizationId,
long userId)
Adds the user to the organization.
|
void |
addOrganizationUser(long organizationId,
com.liferay.portal.kernel.model.User user)
Adds the user to the organization.
|
void |
addOrganizationUsers(long organizationId,
List<com.liferay.portal.kernel.model.User> users)
Adds the users to the organization.
|
void |
addOrganizationUsers(long organizationId,
long[] userIds)
Adds the users to the organization.
|
void |
addPasswordPolicyUsers(long passwordPolicyId,
long[] userIds)
Assigns the password policy to the users, removing any other currently
assigned password policies.
|
void |
addRoleUser(long roleId,
long userId)
Adds the user to the role.
|
void |
addRoleUser(long roleId,
com.liferay.portal.kernel.model.User user)
Adds the user to the role.
|
void |
addRoleUsers(long roleId,
List<com.liferay.portal.kernel.model.User> users)
Adds the users to the role.
|
void |
addRoleUsers(long roleId,
long[] userIds)
Adds the users to the role.
|
void |
addTeamUser(long teamId,
long userId)
Adds the user to the team.
|
void |
addTeamUser(long teamId,
com.liferay.portal.kernel.model.User user)
Adds the user to the team.
|
void |
addTeamUsers(long teamId,
List<com.liferay.portal.kernel.model.User> users)
Adds the users to the team.
|
void |
addTeamUsers(long teamId,
long[] userIds)
Adds the users to the team.
|
com.liferay.portal.kernel.model.User |
addUser(long creatorUserId,
long companyId,
boolean autoPassword,
String password1,
String password2,
boolean autoScreenName,
String screenName,
String emailAddress,
long facebookId,
String openId,
Locale locale,
String firstName,
String middleName,
String lastName,
long prefixId,
long suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
String jobTitle,
long[] groupIds,
long[] organizationIds,
long[] roleIds,
long[] userGroupIds,
boolean sendEmail,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Adds a user.
|
void |
addUserGroupUser(long userGroupId,
long userId)
Adds the user to the user group.
|
void |
addUserGroupUser(long userGroupId,
com.liferay.portal.kernel.model.User user)
Adds the user to the user group.
|
void |
addUserGroupUsers(long userGroupId,
List<com.liferay.portal.kernel.model.User> users)
Adds the users to the user group.
|
void |
addUserGroupUsers(long userGroupId,
long[] userIds)
Adds the users to the user group.
|
com.liferay.portal.kernel.model.User |
addUserWithWorkflow(long creatorUserId,
long companyId,
boolean autoPassword,
String password1,
String password2,
boolean autoScreenName,
String screenName,
String emailAddress,
long facebookId,
String openId,
Locale locale,
String firstName,
String middleName,
String lastName,
long prefixId,
long suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
String jobTitle,
long[] groupIds,
long[] organizationIds,
long[] roleIds,
long[] userGroupIds,
boolean sendEmail,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Adds a user with workflow.
|
void |
afterPropertiesSet() |
protected int |
authenticate(long companyId,
String login,
String password,
String authType,
Map<String,String[]> headerMap,
Map<String,String[]> parameterMap,
Map<String,Object> resultsMap)
Attempts to authenticate the user by their login and password, while
using the AuthPipeline.
|
int |
authenticateByEmailAddress(long companyId,
String emailAddress,
String password,
Map<String,String[]> headerMap,
Map<String,String[]> parameterMap,
Map<String,Object> resultsMap)
Attempts to authenticate the user by their email address and password,
while using the AuthPipeline.
|
int |
authenticateByScreenName(long companyId,
String screenName,
String password,
Map<String,String[]> headerMap,
Map<String,String[]> parameterMap,
Map<String,Object> resultsMap)
Attempts to authenticate the user by their screen name and password,
while using the AuthPipeline.
|
int |
authenticateByUserId(long companyId,
long userId,
String password,
Map<String,String[]> headerMap,
Map<String,String[]> parameterMap,
Map<String,Object> resultsMap)
Attempts to authenticate the user by their primary key and password,
while using the AuthPipeline.
|
long |
authenticateForBasic(long companyId,
String authType,
String login,
String password)
Attempts to authenticate the user using HTTP basic access authentication,
without using the AuthPipeline.
|
long |
authenticateForDigest(long companyId,
String username,
String realm,
String nonce,
String method,
String uri,
String response)
Attempts to authenticate the user using HTTP digest access
authentication, without using the AuthPipeline.
|
boolean |
authenticateForJAAS(long userId,
String encPassword)
Attempts to authenticate the user using JAAS credentials, without using
the AuthPipeline.
|
protected com.liferay.portal.kernel.search.SearchContext |
buildSearchContext(long companyId,
String firstName,
String middleName,
String lastName,
String fullName,
String screenName,
String emailAddress,
String street,
String city,
String zip,
String region,
String country,
int status,
LinkedHashMap<String,Object> params,
boolean andSearch,
int start,
int end,
com.liferay.portal.kernel.search.Sort[] sorts) |
void |
checkLockout(com.liferay.portal.kernel.model.User user)
Checks if the user is currently locked out based on the password policy,
and performs maintenance on the user's lockout and failed login data.
|
void |
checkLoginFailure(com.liferay.portal.kernel.model.User user)
Adds a failed login attempt to the user and updates the user's last
failed login date.
|
void |
checkLoginFailureByEmailAddress(long companyId,
String emailAddress)
Adds a failed login attempt to the user with the email address and
updates the user's last failed login date.
|
void |
checkLoginFailureById(long userId)
Adds a failed login attempt to the user and updates the user's last
failed login date.
|
void |
checkLoginFailureByScreenName(long companyId,
String screenName)
Adds a failed login attempt to the user with the screen name and updates
the user's last failed login date.
|
void |
checkPasswordExpired(com.liferay.portal.kernel.model.User user)
Checks if the user's password is expired based on the password policy,
and performs maintenance on the user's grace login and password reset
data.
|
void |
completeUserRegistration(com.liferay.portal.kernel.model.User user,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Completes the user's registration by generating a password and sending
the confirmation email.
|
com.liferay.portal.kernel.util.KeyValuePair |
decryptUserId(long companyId,
String name,
String password)
Decrypts the user's primary key and password from their encrypted forms.
|
void |
deletePortrait(long userId)
Deletes the user's portrait image.
|
void |
deleteRoleUser(long roleId,
long userId)
Removes the user from the role.
|
com.liferay.portal.kernel.model.User |
deleteUser(long userId)
Deletes the user.
|
com.liferay.portal.kernel.model.User |
deleteUser(com.liferay.portal.kernel.model.User user)
Deletes the user.
|
void |
deleteUserGroupUser(long userGroupId,
long userId)
Removes the user from the user group.
|
protected com.liferay.portal.kernel.model.User |
doCheckLockout(com.liferay.portal.kernel.model.User user,
com.liferay.portal.kernel.model.PasswordPolicy passwordPolicy) |
protected com.liferay.portal.kernel.model.User |
doCheckPasswordExpired(com.liferay.portal.kernel.model.User user,
com.liferay.portal.kernel.model.PasswordPolicy passwordPolicy) |
String |
encryptUserId(String name)
Encrypts the primary key of the user.
|
com.liferay.portal.kernel.model.User |
fetchUserByContactId(long contactId)
Returns the user with the contact ID.
|
com.liferay.portal.kernel.model.User |
fetchUserByEmailAddress(long companyId,
String emailAddress)
Returns the user with the email address.
|
com.liferay.portal.kernel.model.User |
fetchUserByFacebookId(long companyId,
long facebookId)
Returns the user with the Facebook ID.
|
com.liferay.portal.kernel.model.User |
fetchUserByGoogleUserId(long companyId,
String googleUserId)
Returns the user with the Google user ID.
|
com.liferay.portal.kernel.model.User |
fetchUserById(long userId)
Returns the user with the primary key.
|
com.liferay.portal.kernel.model.User |
fetchUserByOpenId(long companyId,
String openId)
Returns the user with the OpenID.
|
com.liferay.portal.kernel.model.User |
fetchUserByPortraitId(long portraitId)
Returns the user with the portrait ID.
|
com.liferay.portal.kernel.model.User |
fetchUserByScreenName(long companyId,
String screenName)
Returns the user with the screen name.
|
protected Date |
getBirthday(int birthdayMonth,
int birthdayDay,
int birthdayYear) |
List<com.liferay.portal.kernel.model.User> |
getCompanyUsers(long companyId,
int start,
int end)
Returns a range of all the users belonging to the company.
|
int |
getCompanyUsersCount(long companyId)
Returns the number of users belonging to the company.
|
com.liferay.portal.kernel.model.User |
getDefaultUser(long companyId)
Returns the default user for the company.
|
long |
getDefaultUserId(long companyId)
Returns the primary key of the default user for the company.
|
long[] |
getGroupUserIds(long groupId)
Returns the primary keys of all the users belonging to the group.
|
List<com.liferay.portal.kernel.model.User> |
getGroupUsers(long groupId,
int status,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
Returns the users belonging to a group.
|
List<com.liferay.portal.kernel.model.User> |
getGroupUsers(long groupId,
int status,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
Returns the users belonging to a group.
|
int |
getGroupUsersCount(long groupId,
int status)
Returns the number of users with the status belonging to the group.
|
List<com.liferay.portal.kernel.model.User> |
getInheritedRoleUsers(long roleId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) |
protected String |
getLogin(String login) |
List<com.liferay.portal.kernel.model.User> |
getNoAnnouncementsDeliveries(String type)
Returns all the users who have not had any announcements of the type
delivered, excluding the default user.
|
List<com.liferay.portal.kernel.model.User> |
getNoContacts()
Returns all the users who do not have any contacts.
|
List<com.liferay.portal.kernel.model.User> |
getNoGroups()
Returns all the users who do not belong to any groups, excluding the
default user.
|
int |
getOrganizationsAndUserGroupsUsersCount(long[] organizationIds,
long[] userGroupIds) |
long[] |
getOrganizationUserIds(long organizationId)
Returns the primary keys of all the users belonging to the organization.
|
List<com.liferay.portal.kernel.model.User> |
getOrganizationUsers(long organizationId,
int status,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
Returns the users belonging to the organization with the status.
|
List<com.liferay.portal.kernel.model.User> |
getOrganizationUsers(long organizationId,
int status,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
Returns the users belonging to the organization with the status.
|
int |
getOrganizationUsersCount(long organizationId,
int status)
Returns the number of users with the status belonging to the
organization.
|
long[] |
getRoleUserIds(long roleId)
Returns the primary keys of all the users belonging to the role.
|
int |
getRoleUsersCount(long roleId,
int status)
Returns the number of users with the status belonging to the role.
|
List<com.liferay.portal.kernel.model.User> |
getSocialUsers(long userId,
int socialRelationType,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
Deprecated.
As of Wilberforce (7.0.x), replaced by
getSocialUsers(long, int, String, int, int,
OrderByComparator) |
List<com.liferay.portal.kernel.model.User> |
getSocialUsers(long userId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
Deprecated.
As of Wilberforce (7.0.x), replaced by
getSocialUsers(long, int, String, int, int,
OrderByComparator) |
List<com.liferay.portal.kernel.model.User> |
getSocialUsers(long userId,
int socialRelationType,
String socialRelationTypeComparator,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) |
List<com.liferay.portal.kernel.model.User> |
getSocialUsers(long userId1,
long userId2,
int socialRelationType,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
Returns an ordered range of all the users with a mutual social relation
of the type with both of the given users.
|
List<com.liferay.portal.kernel.model.User> |
getSocialUsers(long userId1,
long userId2,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
Returns an ordered range of all the users with a mutual social relation
with both of the given users.
|
int |
getSocialUsersCount(long userId)
Deprecated.
As of Wilberforce (7.0.x), replaced by
getSocialUsersCount(long, int, String) |
int |
getSocialUsersCount(long userId,
int socialRelationType)
Deprecated.
As of Wilberforce (7.0.x), replaced by
getSocialUsersCount(long, int, String) |
int |
getSocialUsersCount(long userId,
int socialRelationType,
String socialRelationTypeComparator)
Returns the number of users with a social relation with the user.
|
int |
getSocialUsersCount(long userId1,
long userId2)
Returns the number of users with a mutual social relation with both of
the given users.
|
int |
getSocialUsersCount(long userId1,
long userId2,
int socialRelationType)
Returns the number of users with a mutual social relation of the type
with both of the given users.
|
protected com.liferay.portal.kernel.search.Sort[] |
getSorts(com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) |
com.liferay.portal.kernel.model.User |
getUserByContactId(long contactId)
Returns the user with the contact ID.
|
com.liferay.portal.kernel.model.User |
getUserByEmailAddress(long companyId,
String emailAddress)
Returns the user with the email address.
|
com.liferay.portal.kernel.model.User |
getUserByFacebookId(long companyId,
long facebookId)
Returns the user with the Facebook ID.
|
com.liferay.portal.kernel.model.User |
getUserByGoogleUserId(long companyId,
String googleUserId)
Returns the user with the Google user ID.
|
com.liferay.portal.kernel.model.User |
getUserById(long userId)
Returns the user with the primary key.
|
com.liferay.portal.kernel.model.User |
getUserById(long companyId,
long userId)
Returns the user with the primary key from the company.
|
com.liferay.portal.kernel.model.User |
getUserByOpenId(long companyId,
String openId)
Returns the user with the OpenID.
|
com.liferay.portal.kernel.model.User |
getUserByPortraitId(long portraitId)
Returns the user with the portrait ID.
|
com.liferay.portal.kernel.model.User |
getUserByScreenName(long companyId,
String screenName)
Returns the user with the screen name.
|
com.liferay.portal.kernel.model.User |
getUserByUuidAndCompanyId(String uuid,
long companyId)
Returns the user with the UUID.
|
int |
getUserGroupUsersCount(long userGroupId,
int status)
Returns the number of users with the status belonging to the user group.
|
long |
getUserIdByEmailAddress(long companyId,
String emailAddress)
Returns the primary key of the user with the email address.
|
long |
getUserIdByScreenName(long companyId,
String screenName)
Returns the primary key of the user with the screen name.
|
List<com.liferay.portal.kernel.model.User> |
getUsers(long companyId,
boolean defaultUser,
int status,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) |
int |
getUsersCount(long companyId,
boolean defaultUser,
int status) |
protected int |
handleAuthenticationFailure(String login,
String authType,
com.liferay.portal.kernel.model.User user,
Map<String,String[]> headerMap,
Map<String,String[]> parameterMap) |
boolean |
hasPasswordPolicyUser(long passwordPolicyId,
long userId)
Returns
true if the password policy has been assigned to the
user. |
boolean |
hasRoleUser(long companyId,
String name,
long userId,
boolean inherited)
Returns
true if the user has the role with the name,
optionally through inheritance. |
boolean |
isPasswordExpired(com.liferay.portal.kernel.model.User user)
Returns
true if the user's password is expired. |
boolean |
isPasswordExpiringSoon(com.liferay.portal.kernel.model.User user)
Deprecated.
As of Judson (7.1.x)
|
protected boolean |
isUseCustomSQL(LinkedHashMap<String,Object> params) |
protected boolean |
isUserAllowedToAuthenticate(com.liferay.portal.kernel.model.User user) |
com.liferay.portal.kernel.model.User |
loadGetDefaultUser(long companyId)
Returns the default user for the company.
|
protected void |
notifyUser(com.liferay.portal.kernel.model.User user,
String password,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
protected void |
reindex(List<com.liferay.portal.kernel.model.User> users) |
protected void |
reindex(long userId) |
protected void |
reindex(long[] userIds) |
protected void |
reindex(com.liferay.portal.kernel.model.User user) |
protected com.liferay.portal.kernel.model.User |
resetFailedLoginAttempts(com.liferay.portal.kernel.model.User user) |
protected com.liferay.portal.kernel.model.User |
resetFailedLoginAttempts(com.liferay.portal.kernel.model.User user,
boolean forceUpdate) |
List<com.liferay.portal.kernel.model.User> |
search(long companyId,
String keywords,
int status,
LinkedHashMap<String,Object> params,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
Returns an ordered range of all the users who match the keywords and
status, without using the indexer.
|
com.liferay.portal.kernel.search.Hits |
search(long companyId,
String keywords,
int status,
LinkedHashMap<String,Object> params,
int start,
int end,
com.liferay.portal.kernel.search.Sort sort)
Returns an ordered range of all the users who match the keywords and
status, using the indexer.
|
com.liferay.portal.kernel.search.Hits |
search(long companyId,
String keywords,
int status,
LinkedHashMap<String,Object> params,
int start,
int end,
com.liferay.portal.kernel.search.Sort[] sorts) |
List<com.liferay.portal.kernel.model.User> |
search(long companyId,
String firstName,
String middleName,
String lastName,
String screenName,
String emailAddress,
int status,
LinkedHashMap<String,Object> params,
boolean andSearch,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
Returns an ordered range of all the users with the status, and whose
first name, middle name, last name, screen name, and email address match
the keywords specified for them, without using the indexer.
|
com.liferay.portal.kernel.search.Hits |
search(long companyId,
String firstName,
String middleName,
String lastName,
String screenName,
String emailAddress,
int status,
LinkedHashMap<String,Object> params,
boolean andSearch,
int start,
int end,
com.liferay.portal.kernel.search.Sort sort)
Returns an ordered range of all the users with the status, and whose
first name, middle name, last name, screen name, and email address match
the keywords specified for them, using the indexer.
|
com.liferay.portal.kernel.search.Hits |
search(long companyId,
String firstName,
String middleName,
String lastName,
String screenName,
String emailAddress,
int status,
LinkedHashMap<String,Object> params,
boolean andSearch,
int start,
int end,
com.liferay.portal.kernel.search.Sort[] sorts) |
int |
searchCount(long companyId,
String keywords,
int status,
LinkedHashMap<String,Object> params)
Returns the number of users who match the keywords and status.
|
int |
searchCount(long companyId,
String firstName,
String middleName,
String lastName,
String screenName,
String emailAddress,
int status,
LinkedHashMap<String,Object> params,
boolean andSearch)
Returns the number of users with the status, and whose first name, middle
name, last name, screen name, and email address match the keywords
specified for them.
|
Map<Long,Integer> |
searchCounts(long companyId,
int status,
long[] groupIds) |
List<com.liferay.portal.kernel.model.User> |
searchSocial(long[] groupIds,
long userId,
int[] socialRelationTypes,
String keywords,
int start,
int end) |
List<com.liferay.portal.kernel.model.User> |
searchSocial(long userId,
int[] socialRelationTypes,
String keywords,
int start,
int end) |
List<com.liferay.portal.kernel.model.User> |
searchSocial(long companyId,
long[] groupIds,
String keywords,
int start,
int end) |
com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> |
searchUsers(long companyId,
String keywords,
int status,
LinkedHashMap<String,Object> params,
int start,
int end,
com.liferay.portal.kernel.search.Sort sort) |
com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> |
searchUsers(long companyId,
String keywords,
int status,
LinkedHashMap<String,Object> params,
int start,
int end,
com.liferay.portal.kernel.search.Sort[] sorts) |
com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> |
searchUsers(long companyId,
String firstName,
String middleName,
String lastName,
String screenName,
String emailAddress,
int status,
LinkedHashMap<String,Object> params,
boolean andSearch,
int start,
int end,
com.liferay.portal.kernel.search.Sort sort) |
com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> |
searchUsers(long companyId,
String firstName,
String middleName,
String lastName,
String screenName,
String emailAddress,
int status,
LinkedHashMap<String,Object> params,
boolean andSearch,
int start,
int end,
com.liferay.portal.kernel.search.Sort[] sorts) |
protected com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> |
searchUsers(com.liferay.portal.kernel.search.SearchContext searchContext) |
void |
sendEmailAddressVerification(com.liferay.portal.kernel.model.User user,
String emailAddress,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Sends an email address verification to the user.
|
boolean |
sendPassword(long companyId,
String emailAddress,
String fromName,
String fromAddress,
String subject,
String body,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Sends the password email to the user with the email address.
|
boolean |
sendPasswordByEmailAddress(long companyId,
String emailAddress)
Sends a password notification email to the user matching the email
address.
|
boolean |
sendPasswordByScreenName(long companyId,
String screenName)
Sends a password notification email to the user matching the screen name.
|
boolean |
sendPasswordByUserId(long userId)
Sends a password notification email to the user matching the ID.
|
protected void |
sendPasswordNotification(com.liferay.portal.kernel.model.User user,
long companyId,
String newPassword,
String passwordResetURL,
String fromName,
String fromAddress,
String subject,
String body,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
protected void |
setEmailAddress(com.liferay.portal.kernel.model.User user,
String password,
String firstName,
String middleName,
String lastName,
String emailAddress) |
void |
setRoleUsers(long roleId,
long[] userIds)
Sets the users in the role, removing and adding users to the role as
necessary.
|
void |
setUserGroupUsers(long userGroupId,
long[] userIds)
Sets the users in the user group, removing and adding users to the user
group as necessary.
|
protected void |
trackPassword(com.liferay.portal.kernel.model.User user) |
void |
unsetGroupTeamsUsers(long groupId,
long[] userIds)
Removes the users from the teams of a group.
|
void |
unsetGroupUsers(long groupId,
long[] userIds,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Removes the users from the group.
|
void |
unsetOrganizationUsers(long organizationId,
long[] userIds)
Removes the users from the organization.
|
void |
unsetPasswordPolicyUsers(long passwordPolicyId,
long[] userIds)
Removes the users from the password policy.
|
void |
unsetRoleUsers(long roleId,
List<com.liferay.portal.kernel.model.User> users)
Removes the users from the role.
|
void |
unsetRoleUsers(long roleId,
long[] userIds)
Removes the users from the role.
|
void |
unsetTeamUsers(long teamId,
long[] userIds)
Removes the users from the team.
|
void |
unsetUserGroupUsers(long userGroupId,
long[] userIds)
Removes the users from the user group.
|
com.liferay.portal.kernel.model.User |
updateAgreedToTermsOfUse(long userId,
boolean agreedToTermsOfUse)
Updates whether the user has agreed to the terms of use.
|
void |
updateAsset(long userId,
com.liferay.portal.kernel.model.User user,
long[] assetCategoryIds,
String[] assetTagNames)
Updates the user's asset with the new asset categories and tag names,
removing and adding asset categories and tag names as necessary.
|
com.liferay.portal.kernel.model.User |
updateCreateDate(long userId,
Date createDate)
Updates the user's creation date.
|
com.liferay.portal.kernel.model.User |
updateEmailAddress(long userId,
String password,
String emailAddress1,
String emailAddress2)
Updates the user's email address.
|
com.liferay.portal.kernel.model.User |
updateEmailAddress(long userId,
String password,
String emailAddress1,
String emailAddress2,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Updates the user's email address or sends verification email.
|
com.liferay.portal.kernel.model.User |
updateEmailAddressVerified(long userId,
boolean emailAddressVerified)
Updates whether the user has verified email address.
|
com.liferay.portal.kernel.model.User |
updateFacebookId(long userId,
long facebookId)
Updates the user's Facebook ID.
|
com.liferay.portal.kernel.model.User |
updateGoogleUserId(long userId,
String googleUserId)
Updates the user's Google user ID.
|
void |
updateGroups(long userId,
long[] newGroupIds,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Sets the groups the user is in, removing and adding groups as necessary.
|
protected void |
updateGroups(long userId,
long[] newGroupIds,
com.liferay.portal.kernel.service.ServiceContext serviceContext,
boolean indexingEnabled) |
com.liferay.portal.kernel.model.User |
updateIncompleteUser(long creatorUserId,
long companyId,
boolean autoPassword,
String password1,
String password2,
boolean autoScreenName,
String screenName,
String emailAddress,
long facebookId,
String openId,
Locale locale,
String firstName,
String middleName,
String lastName,
long prefixId,
long suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
String jobTitle,
boolean updateUserInformation,
boolean sendEmail,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Updates a user account that was automatically created when a guest user
participated in an action (e.g. posting a comment) and only provided his
name and email address.
|
com.liferay.portal.kernel.model.User |
updateJobTitle(long userId,
String jobTitle)
Updates the user's job title.
|
com.liferay.portal.kernel.model.User |
updateLastLogin(long userId,
String loginIP)
Updates the user's last login with the current time and the IP address.
|
com.liferay.portal.kernel.model.User |
updateLockout(com.liferay.portal.kernel.model.User user,
boolean lockout)
Updates whether the user is locked out from logging in.
|
com.liferay.portal.kernel.model.User |
updateLockoutByEmailAddress(long companyId,
String emailAddress,
boolean lockout)
Updates whether the user is locked out from logging in.
|
com.liferay.portal.kernel.model.User |
updateLockoutById(long userId,
boolean lockout)
Updates whether the user is locked out from logging in.
|
com.liferay.portal.kernel.model.User |
updateLockoutByScreenName(long companyId,
String screenName,
boolean lockout)
Updates whether the user is locked out from logging in.
|
com.liferay.portal.kernel.model.User |
updateModifiedDate(long userId,
Date modifiedDate)
Updates the user's modified date.
|
com.liferay.portal.kernel.model.User |
updateOpenId(long userId,
String openId)
Updates the user's OpenID.
|
protected void |
updateOrganizations(long userId,
long[] newOrganizationIds,
boolean indexingEnabled) |
void |
updateOrganizations(long userId,
long[] newOrganizationIds,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Sets the organizations that the user is in, removing and adding
organizations as necessary.
|
com.liferay.portal.kernel.model.User |
updatePassword(long userId,
String password1,
String password2,
boolean passwordReset)
Updates the user's password without tracking or validation of the change.
|
com.liferay.portal.kernel.model.User |
updatePassword(long userId,
String password1,
String password2,
boolean passwordReset,
boolean silentUpdate)
Updates the user's password, optionally with tracking and validation of
the change.
|
com.liferay.portal.kernel.model.User |
updatePasswordManually(long userId,
String password,
boolean passwordEncrypted,
boolean passwordReset,
Date passwordModifiedDate)
Updates the user's password with manually input information.
|
com.liferay.portal.kernel.model.User |
updatePasswordReset(long userId,
boolean passwordReset)
Updates whether the user should be asked to reset their password the next
time they login.
|
com.liferay.portal.kernel.model.User |
updatePortrait(long userId,
byte[] bytes)
Updates the user's portrait image.
|
com.liferay.portal.kernel.model.User |
updateReminderQuery(long userId,
String question,
String answer)
Updates the user's password reset question and answer.
|
com.liferay.portal.kernel.model.User |
updateScreenName(long userId,
String screenName)
Updates the user's screen name.
|
com.liferay.portal.kernel.model.User |
updateStatus(long userId,
int status)
Deprecated.
As of Wilberforce (7.0.x), replaced by
updateStatus(long, int, ServiceContext) |
com.liferay.portal.kernel.model.User |
updateStatus(long userId,
int status,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Updates the user's workflow status.
|
com.liferay.portal.kernel.model.User |
updateUser(long userId,
String oldPassword,
String newPassword1,
String newPassword2,
boolean passwordReset,
String reminderQueryQuestion,
String reminderQueryAnswer,
String screenName,
String emailAddress,
long facebookId,
String openId,
boolean portrait,
byte[] portraitBytes,
String languageId,
String timeZoneId,
String greeting,
String comments,
String firstName,
String middleName,
String lastName,
long prefixId,
long suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
String smsSn,
String facebookSn,
String jabberSn,
String skypeSn,
String twitterSn,
String jobTitle,
long[] groupIds,
long[] organizationIds,
long[] roleIds,
List<com.liferay.portal.kernel.model.UserGroupRole> userGroupRoles,
long[] userGroupIds,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Updates the user.
|
com.liferay.portal.kernel.model.User |
updateUser(long userId,
String oldPassword,
String newPassword1,
String newPassword2,
boolean passwordReset,
String reminderQueryQuestion,
String reminderQueryAnswer,
String screenName,
String emailAddress,
long facebookId,
String openId,
String languageId,
String timeZoneId,
String greeting,
String comments,
String firstName,
String middleName,
String lastName,
long prefixId,
long suffixId,
boolean male,
int birthdayMonth,
int birthdayDay,
int birthdayYear,
String smsSn,
String facebookSn,
String jabberSn,
String skypeSn,
String twitterSn,
String jobTitle,
long[] groupIds,
long[] organizationIds,
long[] roleIds,
List<com.liferay.portal.kernel.model.UserGroupRole> userGroupRoles,
long[] userGroupIds,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Deprecated.
As of Wilberforce (7.0.x), replaced by
updateUser(long, String, String, String, boolean, String,
String, String, String, long, String, boolean, byte[],
String, String, String, String, String, String, String, long,
long, boolean, int, int, int, String, String, String, String,
String, String, long[], long[], long[], List, long[],
ServiceContext) |
protected void |
updateUserGroupRoles(com.liferay.portal.kernel.model.User user,
long[] groupIds,
long[] organizationIds,
List<com.liferay.portal.kernel.model.UserGroupRole> userGroupRoles,
List<com.liferay.portal.kernel.model.UserGroupRole> previousUserGroupRoles) |
protected void |
validate(long companyId,
long userId,
boolean autoPassword,
String password1,
String password2,
boolean autoScreenName,
String screenName,
String emailAddress,
String openId,
String firstName,
String middleName,
String lastName,
long[] organizationIds,
Locale locale) |
protected void |
validate(long userId,
String screenName,
String emailAddress,
String openId,
String firstName,
String middleName,
String lastName,
String smsSn,
Locale locale) |
protected void |
validateCompanyMaxUsers(long companyId) |
protected void |
validateEmailAddress(long companyId,
String emailAddress) |
protected void |
validateEmailAddress(com.liferay.portal.kernel.model.User user,
String emailAddress1,
String emailAddress2) |
protected void |
validateFullName(long companyId,
String firstName,
String middleName,
String lastName,
Locale locale) |
protected void |
validateGoogleUserId(long companyId,
long userId,
String googleUserId) |
protected void |
validateOpenId(long companyId,
long userId,
String openId) |
protected void |
validatePassword(long companyId,
long userId,
String password1,
String password2) |
protected void |
validateReminderQuery(String question,
String answer) |
protected void |
validateScreenName(long companyId,
long userId,
String screenName) |
void |
verifyEmailAddress(String ticketKey)
Verifies the email address of the ticket.
|
addUser, clearGroupUsers, clearOrganizationUsers, clearRoleUsers, clearTeamUsers, clearUserGroupUsers, createUser, deleteGroupUser, deleteGroupUser, deleteGroupUsers, deleteGroupUsers, deleteOrganizationUser, deleteOrganizationUser, deleteOrganizationUsers, deleteOrganizationUsers, deletePersistedModel, deleteRoleUser, deleteRoleUsers, deleteRoleUsers, deleteTeamUser, deleteTeamUser, deleteTeamUsers, deleteTeamUsers, deleteUserGroupUser, deleteUserGroupUsers, deleteUserGroupUsers, destroy, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQueryCount, dynamicQueryCount, fetchUser, fetchUserByUuidAndCompanyId, getActionableDynamicQuery, getAnnouncementsDeliveryLocalService, getAnnouncementsDeliveryPersistence, getAssetEntryFinder, getAssetEntryLocalService, getAssetEntryPersistence, getBlogsStatsUserFinder, getBlogsStatsUserLocalService, getBlogsStatsUserPersistence, getBrowserTrackerLocalService, getBrowserTrackerPersistence, getCompanyLocalService, getCompanyPersistence, getContactLocalService, getContactPersistence, getCounterLocalService, getDLFileEntryFinder, getDLFileEntryLocalService, getDLFileEntryPersistence, getDLFileRankFinder, getDLFileRankLocalService, getDLFileRankPersistence, getExpandoRowLocalService, getExpandoRowPersistence, getExportActionableDynamicQuery, getGroupFinder, getGroupLocalService, getGroupPersistence, getGroupPrimaryKeys, getGroupUsers, getGroupUsers, getGroupUsers, getGroupUsersCount, getImageLocalService, getImagePersistence, getIndexableActionableDynamicQuery, getLayoutFinder, getLayoutLocalService, getLayoutPersistence, getMBBanLocalService, getMBBanPersistence, getMBMessageFinder, getMBMessageLocalService, getMBMessagePersistence, getMBStatsUserLocalService, getMBStatsUserPersistence, getMBThreadFlagLocalService, getMBThreadFlagPersistence, getMembershipRequestLocalService, getMembershipRequestPersistence, getModelClass, getModelClassName, getOrganizationFinder, getOrganizationLocalService, getOrganizationPersistence, getOrganizationPrimaryKeys, getOrganizationUsers, getOrganizationUsers, getOrganizationUsers, getOrganizationUsersCount, getOSGiServiceIdentifier, getPasswordPolicyFinder, getPasswordPolicyLocalService, getPasswordPolicyPersistence, getPasswordPolicyRelLocalService, getPasswordPolicyRelPersistence, getPasswordTrackerLocalService, getPasswordTrackerPersistence, getPersistedModel, getRatingsStatsFinder, getRatingsStatsLocalService, getRatingsStatsPersistence, getRecentLayoutBranchLocalService, getRecentLayoutBranchPersistence, getRecentLayoutRevisionLocalService, getRecentLayoutRevisionPersistence, getRecentLayoutSetBranchLocalService, getRecentLayoutSetBranchPersistence, getResourceLocalService, getRoleFinder, getRoleLocalService, getRolePersistence, getRolePrimaryKeys, getRoleUsers, getRoleUsers, getRoleUsers, getRoleUsersCount, getSocialActivityFinder, getSocialActivityLocalService, getSocialActivityPersistence, getSocialRelationLocalService, getSocialRelationPersistence, getSocialRequestLocalService, getSocialRequestPersistence, getSubscriptionLocalService, getSubscriptionPersistence, getTeamFinder, getTeamLocalService, getTeamPersistence, getTeamPrimaryKeys, getTeamUsers, getTeamUsers, getTeamUsers, getTeamUsersCount, getTicketLocalService, getTicketPersistence, getUser, getUserFinder, getUserGroupFinder, getUserGroupLocalService, getUserGroupPersistence, getUserGroupPrimaryKeys, getUserGroupRoleFinder, getUserGroupRoleLocalService, getUserGroupRolePersistence, getUserGroupUsers, getUserGroupUsers, getUserGroupUsers, getUserGroupUsersCount, getUserIdMapperLocalService, getUserIdMapperPersistence, getUserLocalService, getUserPersistence, getUsers, getUsersCount, getWorkflowInstanceLinkLocalService, getWorkflowInstanceLinkPersistence, hasGroupUser, hasGroupUsers, hasOrganizationUser, hasOrganizationUsers, hasRoleUser, hasRoleUsers, hasTeamUser, hasTeamUsers, hasUserGroupUser, hasUserGroupUsers, initActionableDynamicQuery, runSQL, setAnnouncementsDeliveryLocalService, setAnnouncementsDeliveryPersistence, setAssetEntryFinder, setAssetEntryLocalService, setAssetEntryPersistence, setBlogsStatsUserFinder, setBlogsStatsUserLocalService, setBlogsStatsUserPersistence, setBrowserTrackerLocalService, setBrowserTrackerPersistence, setCompanyLocalService, setCompanyPersistence, setContactLocalService, setContactPersistence, setCounterLocalService, setDLFileEntryFinder, setDLFileEntryLocalService, setDLFileEntryPersistence, setDLFileRankFinder, setDLFileRankLocalService, setDLFileRankPersistence, setExpandoRowLocalService, setExpandoRowPersistence, setGroupFinder, setGroupLocalService, setGroupPersistence, setGroupUsers, setImageLocalService, setImagePersistence, setLayoutFinder, setLayoutLocalService, setLayoutPersistence, setMBBanLocalService, setMBBanPersistence, setMBMessageFinder, setMBMessageLocalService, setMBMessagePersistence, setMBStatsUserLocalService, setMBStatsUserPersistence, setMBThreadFlagLocalService, setMBThreadFlagPersistence, setMembershipRequestLocalService, setMembershipRequestPersistence, setOrganizationFinder, setOrganizationLocalService, setOrganizationPersistence, setOrganizationUsers, setPasswordPolicyFinder, setPasswordPolicyLocalService, setPasswordPolicyPersistence, setPasswordPolicyRelLocalService, setPasswordPolicyRelPersistence, setPasswordTrackerLocalService, setPasswordTrackerPersistence, setRatingsStatsFinder, setRatingsStatsLocalService, setRatingsStatsPersistence, setRecentLayoutBranchLocalService, setRecentLayoutBranchPersistence, setRecentLayoutRevisionLocalService, setRecentLayoutRevisionPersistence, setRecentLayoutSetBranchLocalService, setRecentLayoutSetBranchPersistence, setResourceLocalService, setRoleFinder, setRoleLocalService, setRolePersistence, setSocialActivityFinder, setSocialActivityLocalService, setSocialActivityPersistence, setSocialRelationLocalService, setSocialRelationPersistence, setSocialRequestLocalService, setSocialRequestPersistence, setSubscriptionLocalService, setSubscriptionPersistence, setTeamFinder, setTeamLocalService, setTeamPersistence, setTeamUsers, setTicketLocalService, setTicketPersistence, setUserFinder, setUserGroupFinder, setUserGroupLocalService, setUserGroupPersistence, setUserGroupRoleFinder, setUserGroupRoleLocalService, setUserGroupRolePersistence, setUserIdMapperLocalService, setUserIdMapperPersistence, setUserLocalService, setUserPersistence, setWorkflowInstanceLinkLocalService, setWorkflowInstanceLinkPersistence, updateUser
@BeanReference(type=com.liferay.mail.kernel.service.MailService.class) protected com.liferay.mail.kernel.service.MailService mailService
public com.liferay.portal.kernel.model.User addDefaultAdminUser(long companyId, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyscreenName
- the user's screen nameemailAddress
- the user's email addresslocale
- the user's localefirstName
- the user's first namemiddleName
- the user's middle namelastName
- the user's last namecom.liferay.portal.kernel.exception.PortalException
public void addDefaultGroups(long userId) throws com.liferay.portal.kernel.exception.PortalException
portal.properties
with the key
admin.default.group.names
.userId
- the primary key of the usercom.liferay.portal.kernel.exception.PortalException
public void addDefaultRoles(long userId) throws com.liferay.portal.kernel.exception.PortalException
portal.properties
with the key
admin.default.role.names
.userId
- the primary key of the usercom.liferay.portal.kernel.exception.PortalException
public void addDefaultUserGroups(long userId) throws com.liferay.portal.kernel.exception.PortalException
portal.properties
with the property
admin.default.user.group.names
.userId
- the primary key of the usercom.liferay.portal.kernel.exception.PortalException
public void addGroupUser(long groupId, long userId)
addGroupUser
in interface com.liferay.portal.kernel.service.UserLocalService
addGroupUser
in class UserLocalServiceBaseImpl
groupId
- the primary key of the groupuserId
- the primary key of the userpublic void addGroupUser(long groupId, com.liferay.portal.kernel.model.User user)
addGroupUser
in interface com.liferay.portal.kernel.service.UserLocalService
addGroupUser
in class UserLocalServiceBaseImpl
groupId
- the primary key of the groupuser
- the userpublic void addGroupUsers(long groupId, List<com.liferay.portal.kernel.model.User> users) throws com.liferay.portal.kernel.exception.PortalException
addGroupUsers
in interface com.liferay.portal.kernel.service.UserLocalService
addGroupUsers
in class UserLocalServiceBaseImpl
groupId
- the primary key of the groupusers
- the userscom.liferay.portal.kernel.exception.PortalException
public void addGroupUsers(long groupId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException
addGroupUsers
in interface com.liferay.portal.kernel.service.UserLocalService
addGroupUsers
in class UserLocalServiceBaseImpl
groupId
- the primary key of the groupuserIds
- the primary keys of the userscom.liferay.portal.kernel.exception.PortalException
public void addOrganizationUser(long organizationId, long userId)
addOrganizationUser
in interface com.liferay.portal.kernel.service.UserLocalService
addOrganizationUser
in class UserLocalServiceBaseImpl
organizationId
- the primary key of the organizationuserId
- the primary key of the userpublic void addOrganizationUser(long organizationId, com.liferay.portal.kernel.model.User user)
addOrganizationUser
in interface com.liferay.portal.kernel.service.UserLocalService
addOrganizationUser
in class UserLocalServiceBaseImpl
organizationId
- the primary key of the organizationuser
- the userpublic void addOrganizationUsers(long organizationId, List<com.liferay.portal.kernel.model.User> users) throws com.liferay.portal.kernel.exception.PortalException
addOrganizationUsers
in interface com.liferay.portal.kernel.service.UserLocalService
addOrganizationUsers
in class UserLocalServiceBaseImpl
organizationId
- the primary key of the organizationusers
- the userscom.liferay.portal.kernel.exception.PortalException
public void addOrganizationUsers(long organizationId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException
addOrganizationUsers
in interface com.liferay.portal.kernel.service.UserLocalService
addOrganizationUsers
in class UserLocalServiceBaseImpl
organizationId
- the primary key of the organizationuserIds
- the primary keys of the userscom.liferay.portal.kernel.exception.PortalException
public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
passwordPolicyId
- the primary key of the password policyuserIds
- the primary keys of the userspublic void addRoleUser(long roleId, long userId)
addRoleUser
in interface com.liferay.portal.kernel.service.UserLocalService
addRoleUser
in class UserLocalServiceBaseImpl
roleId
- the primary key of the roleuserId
- the primary key of the userpublic void addRoleUser(long roleId, com.liferay.portal.kernel.model.User user)
addRoleUser
in interface com.liferay.portal.kernel.service.UserLocalService
addRoleUser
in class UserLocalServiceBaseImpl
roleId
- the primary key of the roleuser
- the userpublic void addRoleUsers(long roleId, List<com.liferay.portal.kernel.model.User> users) throws com.liferay.portal.kernel.exception.PortalException
addRoleUsers
in interface com.liferay.portal.kernel.service.UserLocalService
addRoleUsers
in class UserLocalServiceBaseImpl
roleId
- the primary key of the roleusers
- the userscom.liferay.portal.kernel.exception.PortalException
public void addRoleUsers(long roleId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException
addRoleUsers
in interface com.liferay.portal.kernel.service.UserLocalService
addRoleUsers
in class UserLocalServiceBaseImpl
roleId
- the primary key of the roleuserIds
- the primary keys of the userscom.liferay.portal.kernel.exception.PortalException
public void addTeamUser(long teamId, long userId)
addTeamUser
in interface com.liferay.portal.kernel.service.UserLocalService
addTeamUser
in class UserLocalServiceBaseImpl
teamId
- the primary key of the teamuserId
- the primary key of the userpublic void addTeamUser(long teamId, com.liferay.portal.kernel.model.User user)
addTeamUser
in interface com.liferay.portal.kernel.service.UserLocalService
addTeamUser
in class UserLocalServiceBaseImpl
teamId
- the primary key of the teamuser
- the userpublic void addTeamUsers(long teamId, List<com.liferay.portal.kernel.model.User> users) throws com.liferay.portal.kernel.exception.PortalException
addTeamUsers
in interface com.liferay.portal.kernel.service.UserLocalService
addTeamUsers
in class UserLocalServiceBaseImpl
teamId
- the primary key of the teamusers
- the userscom.liferay.portal.kernel.exception.PortalException
public void addTeamUsers(long teamId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException
addTeamUsers
in interface com.liferay.portal.kernel.service.UserLocalService
addTeamUsers
in class UserLocalServiceBaseImpl
teamId
- the primary key of the teamuserIds
- the primary keys of the userscom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User addUser(long creatorUserId, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
This method handles the creation and bookkeeping of the user including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, etc.
creatorUserId
- the primary key of the creatorcompanyId
- the primary key of the user's companyautoPassword
- whether a password should be automatically generated
for the userpassword1
- the user's passwordpassword2
- the user's password confirmationautoScreenName
- whether a screen name should be automatically
generated for the userscreenName
- the user's screen nameemailAddress
- the user's email addressfacebookId
- the user's facebook IDopenId
- the user's OpenIDlocale
- the user's localefirstName
- the user's first namemiddleName
- the user's middle namelastName
- the user's last nameprefixId
- the user's name prefix IDsuffixId
- the user's name suffix IDmale
- whether the user is malebirthdayMonth
- the user's birthday month (0-based, meaning 0 for
January)birthdayDay
- the user's birthday daybirthdayYear
- the user's birthday yearjobTitle
- the user's job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the roles this user possessesuserGroupIds
- the primary keys of the user's user groupssendEmail
- whether to send the user an email notification about
their new accountserviceContext
- the service context to be applied (optionally
null
). Can set the UUID (with the uuid
attribute), asset category IDs, asset tag names, and expando
bridge attributes for the user.com.liferay.portal.kernel.exception.PortalException
public void addUserGroupUser(long userGroupId, long userId)
addUserGroupUser
in interface com.liferay.portal.kernel.service.UserLocalService
addUserGroupUser
in class UserLocalServiceBaseImpl
userGroupId
- the primary key of the user grouppublic void addUserGroupUser(long userGroupId, com.liferay.portal.kernel.model.User user)
addUserGroupUser
in interface com.liferay.portal.kernel.service.UserLocalService
addUserGroupUser
in class UserLocalServiceBaseImpl
userGroupId
- the primary key of the user groupuser
- the userpublic void addUserGroupUsers(long userGroupId, List<com.liferay.portal.kernel.model.User> users) throws com.liferay.portal.kernel.exception.PortalException
addUserGroupUsers
in interface com.liferay.portal.kernel.service.UserLocalService
addUserGroupUsers
in class UserLocalServiceBaseImpl
userGroupId
- the primary key of the user groupusers
- the userscom.liferay.portal.kernel.exception.PortalException
public void addUserGroupUsers(long userGroupId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException
addUserGroupUsers
in interface com.liferay.portal.kernel.service.UserLocalService
addUserGroupUsers
in class UserLocalServiceBaseImpl
userGroupId
- the primary key of the user groupuserIds
- the primary keys of the userscom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User addUserWithWorkflow(long creatorUserId, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
This method handles the creation and bookkeeping of the user including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, etc.
creatorUserId
- the primary key of the creatorcompanyId
- the primary key of the user's companyautoPassword
- whether a password should be automatically generated
for the userpassword1
- the user's passwordpassword2
- the user's password confirmationautoScreenName
- whether a screen name should be automatically
generated for the userscreenName
- the user's screen nameemailAddress
- the user's email addressfacebookId
- the user's facebook IDopenId
- the user's OpenIDlocale
- the user's localefirstName
- the user's first namemiddleName
- the user's middle namelastName
- the user's last nameprefixId
- the user's name prefix IDsuffixId
- the user's name suffix IDmale
- whether the user is malebirthdayMonth
- the user's birthday month (0-based, meaning 0 for
January)birthdayDay
- the user's birthday daybirthdayYear
- the user's birthday yearjobTitle
- the user's job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the roles this user possessesuserGroupIds
- the primary keys of the user's user groupssendEmail
- whether to send the user an email notification about
their new accountserviceContext
- the service context to be applied (optionally
null
). Can set the UUID (with the uuid
attribute), asset category IDs, asset tag names, and expando
bridge attributes for the user.com.liferay.portal.kernel.exception.PortalException
public void afterPropertiesSet()
afterPropertiesSet
in class UserLocalServiceBaseImpl
@Transactional(propagation=REQUIRED) public int authenticateByEmailAddress(long companyId, String emailAddress, String password, Map<String,String[]> headerMap, Map<String,String[]> parameterMap, Map<String,Object> resultsMap) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyemailAddress
- the user's email addresspassword
- the user's passwordheaderMap
- the header map from the authentication requestparameterMap
- the parameter map from the authentication requestresultsMap
- the map of authentication results (may be nil). After
a successful authentication the user's primary key will be placed
under the key userId
.Authenticator.FAILURE
indicating that the user's credentials are
invalid, Authenticator.SUCCESS
indicating a successful
login, or Authenticator.DNE
indicating that a user with
that login does not exist.com.liferay.portal.kernel.exception.PortalException
AuthPipeline
@Transactional(propagation=REQUIRED) public int authenticateByScreenName(long companyId, String screenName, String password, Map<String,String[]> headerMap, Map<String,String[]> parameterMap, Map<String,Object> resultsMap) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyscreenName
- the user's screen namepassword
- the user's passwordheaderMap
- the header map from the authentication requestparameterMap
- the parameter map from the authentication requestresultsMap
- the map of authentication results (may be nil). After
a successful authentication the user's primary key will be placed
under the key userId
.Authenticator.FAILURE
indicating that the user's credentials are
invalid, Authenticator.SUCCESS
indicating a successful
login, or Authenticator.DNE
indicating that a user with
that login does not exist.com.liferay.portal.kernel.exception.PortalException
AuthPipeline
@Transactional(propagation=REQUIRED) public int authenticateByUserId(long companyId, long userId, String password, Map<String,String[]> headerMap, Map<String,String[]> parameterMap, Map<String,Object> resultsMap) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyuserId
- the user's primary keypassword
- the user's passwordheaderMap
- the header map from the authentication requestparameterMap
- the parameter map from the authentication requestresultsMap
- the map of authentication results (may be nil). After
a successful authentication the user's primary key will be placed
under the key userId
.Authenticator.FAILURE
indicating that the user's credentials are
invalid, Authenticator.SUCCESS
indicating a successful
login, or Authenticator.DNE
indicating that a user with
that login does not exist.com.liferay.portal.kernel.exception.PortalException
AuthPipeline
@Transactional(propagation=SUPPORTS) public long authenticateForBasic(long companyId, String authType, String login, String password) throws com.liferay.portal.kernel.exception.PortalException
tunnel-web
.
Authentication type specifies what login
contains.The valid
values are:
CompanyConstants.AUTH_TYPE_EA
- login
is the
user's email address
CompanyConstants.AUTH_TYPE_SN
- login
is the
user's screen name
CompanyConstants.AUTH_TYPE_ID
- login
is the
user's primary key
companyId
- the primary key of the user's companyauthType
- the type of authentication to performlogin
- either the user's email address, screen name, or primary
key depending on the value of authType
password
- the user's password0
otherwisecom.liferay.portal.kernel.exception.PortalException
@Transactional(propagation=SUPPORTS) public long authenticateForDigest(long companyId, String username, String realm, String nonce, String method, String uri, String response) throws com.liferay.portal.kernel.exception.PortalException
tunnel-web
.companyId
- the primary key of the user's companyusername
- either the user's email address, screen name, or primary
keyrealm
- unusednonce
- the number used oncemethod
- the request methoduri
- the request URIresponse
- the authentication response hash0
otherwisecom.liferay.portal.kernel.exception.PortalException
@Transactional(propagation=SUPPORTS, readOnly=true) public boolean authenticateForJAAS(long userId, String encPassword)
userId
- the primary key of the userencPassword
- the encrypted passwordtrue
if authentication is successful;
false
otherwisepublic void checkLockout(com.liferay.portal.kernel.model.User user) throws com.liferay.portal.kernel.exception.PortalException
user
- the usercom.liferay.portal.kernel.exception.PortalException
public void checkLoginFailure(com.liferay.portal.kernel.model.User user)
user
- the userpublic void checkLoginFailureByEmailAddress(long companyId, String emailAddress) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyemailAddress
- the user's email addresscom.liferay.portal.kernel.exception.PortalException
public void checkLoginFailureById(long userId) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the usercom.liferay.portal.kernel.exception.PortalException
public void checkLoginFailureByScreenName(long companyId, String screenName) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyscreenName
- the user's screen namecom.liferay.portal.kernel.exception.PortalException
public void checkPasswordExpired(com.liferay.portal.kernel.model.User user) throws com.liferay.portal.kernel.exception.PortalException
user
- the usercom.liferay.portal.kernel.exception.PortalException
public void completeUserRegistration(com.liferay.portal.kernel.model.User user, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
user
- the userserviceContext
- the service context to be applied. You can specify
an unencrypted custom password for the user via attribute
passwordUnencrypted
. You automatically generate a
password for the user by setting attribute
autoPassword
to true
. You can send a
confirmation email to the user by setting attribute
sendEmail
to true
.com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.util.KeyValuePair decryptUserId(long companyId, String name, String password) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyname
- the encrypted primary key of the userpassword
- the encrypted password of the usercom.liferay.portal.kernel.exception.PortalException
public void deletePortrait(long userId) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the usercom.liferay.portal.kernel.exception.PortalException
public void deleteRoleUser(long roleId, long userId) throws com.liferay.portal.kernel.exception.PortalException
deleteRoleUser
in interface com.liferay.portal.kernel.service.UserLocalService
deleteRoleUser
in class UserLocalServiceBaseImpl
roleId
- the primary key of the roleuserId
- the primary key of the usercom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User deleteUser(long userId) throws com.liferay.portal.kernel.exception.PortalException
deleteUser
in interface com.liferay.portal.kernel.service.UserLocalService
deleteUser
in class UserLocalServiceBaseImpl
userId
- the primary key of the usercom.liferay.portal.kernel.exception.PortalException
- if a user with the primary key could not be foundpublic com.liferay.portal.kernel.model.User deleteUser(com.liferay.portal.kernel.model.User user) throws com.liferay.portal.kernel.exception.PortalException
deleteUser
in interface com.liferay.portal.kernel.service.UserLocalService
deleteUser
in class UserLocalServiceBaseImpl
user
- the usercom.liferay.portal.kernel.exception.PortalException
public void deleteUserGroupUser(long userGroupId, long userId) throws com.liferay.portal.kernel.exception.PortalException
deleteUserGroupUser
in interface com.liferay.portal.kernel.service.UserLocalService
deleteUserGroupUser
in class UserLocalServiceBaseImpl
userGroupId
- the primary key of the user groupuserId
- the primary key of the usercom.liferay.portal.kernel.exception.PortalException
@Transactional(propagation=SUPPORTS, readOnly=true) public String encryptUserId(String name) throws com.liferay.portal.kernel.exception.PortalException
name
- the primary key of the usercom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User fetchUserByContactId(long contactId)
contactId
- the user's contact IDnull
if a user with
the contact ID could not be foundpublic com.liferay.portal.kernel.model.User fetchUserByEmailAddress(long companyId, String emailAddress)
companyId
- the primary key of the user's companyemailAddress
- the user's email addressnull
if a user
with the email address could not be foundpublic com.liferay.portal.kernel.model.User fetchUserByFacebookId(long companyId, long facebookId)
companyId
- the primary key of the user's companyfacebookId
- the user's Facebook IDnull
if a user
with the Facebook ID could not be foundpublic com.liferay.portal.kernel.model.User fetchUserByGoogleUserId(long companyId, String googleUserId)
companyId
- the primary key of the user's companygoogleUserId
- the user's Google user IDnull
if a user
with the Google user ID could not be foundpublic com.liferay.portal.kernel.model.User fetchUserById(long userId)
userId
- the primary key of the usernull
if a user
with the primary key could not be foundpublic com.liferay.portal.kernel.model.User fetchUserByOpenId(long companyId, String openId)
companyId
- the primary key of the user's companyopenId
- the user's OpenIDnull
if a user with the
OpenID could not be foundpublic com.liferay.portal.kernel.model.User fetchUserByPortraitId(long portraitId)
portraitId
- the user's portrait IDnull
if a user
with the portrait ID could not be foundpublic com.liferay.portal.kernel.model.User fetchUserByScreenName(long companyId, String screenName)
companyId
- the primary key of the user's companyscreenName
- the user's screen namenull
if a user
with the screen name could not be foundpublic List<com.liferay.portal.kernel.model.User> getCompanyUsers(long companyId, int start, int end)
Useful when paginating results. Returns a maximum of end -
start
instances. start
and end
are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full
result set.
companyId
- the primary key of the companystart
- the lower bound of the range of usersend
- the upper bound of the range of users (not inclusive)public int getCompanyUsersCount(long companyId)
companyId
- the primary key of the company@Skip public com.liferay.portal.kernel.model.User getDefaultUser(long companyId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companycom.liferay.portal.kernel.exception.PortalException
@Skip public long getDefaultUserId(long companyId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companycom.liferay.portal.kernel.exception.PortalException
public long[] getGroupUserIds(long groupId)
groupId
- the primary key of the grouppublic List<com.liferay.portal.kernel.model.User> getGroupUsers(long groupId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) throws com.liferay.portal.kernel.exception.PortalException
groupId
- the primary key of the groupstatus
- the workflow statusstart
- the lower bound of the range of usersend
- the upper bound of the range of users (not inclusive)obc
- the comparator to order the users by (optionally
null
)com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.User> getGroupUsers(long groupId, int status, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) throws com.liferay.portal.kernel.exception.PortalException
groupId
- the primary key of the groupstatus
- the workflow statusobc
- the comparator to order the users by (optionally
null
)com.liferay.portal.kernel.exception.PortalException
public int getGroupUsersCount(long groupId, int status) throws com.liferay.portal.kernel.exception.PortalException
groupId
- the primary key of the groupstatus
- the workflow statuscom.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.User> getInheritedRoleUsers(long roleId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.User> getNoAnnouncementsDeliveries(String type)
type
- the type of announcementpublic List<com.liferay.portal.kernel.model.User> getNoContacts()
public List<com.liferay.portal.kernel.model.User> getNoGroups()
public int getOrganizationsAndUserGroupsUsersCount(long[] organizationIds, long[] userGroupIds)
public long[] getOrganizationUserIds(long organizationId)
organizationId
- the primary key of the organizationpublic List<com.liferay.portal.kernel.model.User> getOrganizationUsers(long organizationId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) throws com.liferay.portal.kernel.exception.PortalException
organizationId
- the primary key of the organizationstatus
- the workflow statusstart
- the lower bound of the range of usersend
- the upper bound of the range of users (not inclusive)obc
- the comparator to order the users by (optionally
null
)com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.User> getOrganizationUsers(long organizationId, int status, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) throws com.liferay.portal.kernel.exception.PortalException
organizationId
- the primary key of the organizationstatus
- the workflow statusobc
- the comparator to order the users by (optionally
null
)com.liferay.portal.kernel.exception.PortalException
public int getOrganizationUsersCount(long organizationId, int status) throws com.liferay.portal.kernel.exception.PortalException
organizationId
- the primary key of the organizationstatus
- the workflow statuscom.liferay.portal.kernel.exception.PortalException
public long[] getRoleUserIds(long roleId)
roleId
- the primary key of the rolepublic int getRoleUsersCount(long roleId, int status) throws com.liferay.portal.kernel.exception.PortalException
roleId
- the primary key of the rolestatus
- the workflow statuscom.liferay.portal.kernel.exception.PortalException
@Deprecated public List<com.liferay.portal.kernel.model.User> getSocialUsers(long userId, int socialRelationType, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) throws com.liferay.portal.kernel.exception.PortalException
getSocialUsers(long, int, String, int, int,
OrderByComparator)
Useful when paginating results. Returns a maximum of end -
start
instances. start
and end
are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full
result set.
userId
- the primary key of the usersocialRelationType
- the type of social relation. The possible
types can be found in SocialRelationConstants
.start
- the lower bound of the range of usersend
- the upper bound of the range of users (not inclusive)obc
- the comparator to order the users by (optionally
null
)com.liferay.portal.kernel.exception.PortalException
@Deprecated public List<com.liferay.portal.kernel.model.User> getSocialUsers(long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) throws com.liferay.portal.kernel.exception.PortalException
getSocialUsers(long, int, String, int, int,
OrderByComparator)
Useful when paginating results. Returns a maximum of end -
start
instances. start
and end
are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full
result set.
userId
- the primary key of the userstart
- the lower bound of the range of usersend
- the upper bound of the range of users (not inclusive)obc
- the comparator to order the users by (optionally
null
)com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.User> getSocialUsers(long userId, int socialRelationType, String socialRelationTypeComparator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.User> getSocialUsers(long userId1, long userId2, int socialRelationType, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) throws com.liferay.portal.kernel.exception.PortalException
Useful when paginating results. Returns a maximum of end -
start
instances. start
and end
are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full
result set.
userId1
- the primary key of the first useruserId2
- the primary key of the second usersocialRelationType
- the type of social relation. The possible
types can be found in SocialRelationConstants
.start
- the lower bound of the range of usersend
- the upper bound of the range of users (not inclusive)obc
- the comparator to order the users by (optionally
null
)com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.User> getSocialUsers(long userId1, long userId2, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc) throws com.liferay.portal.kernel.exception.PortalException
Useful when paginating results. Returns a maximum of end -
start
instances. start
and end
are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full
result set.
userId1
- the primary key of the first useruserId2
- the primary key of the second userstart
- the lower bound of the range of usersend
- the upper bound of the range of users (not inclusive)obc
- the comparator to order the users by (optionally
null
)com.liferay.portal.kernel.exception.PortalException
@Deprecated public int getSocialUsersCount(long userId) throws com.liferay.portal.kernel.exception.PortalException
getSocialUsersCount(long, int, String)
userId
- the primary key of the usercom.liferay.portal.kernel.exception.PortalException
@Deprecated public int getSocialUsersCount(long userId, int socialRelationType) throws com.liferay.portal.kernel.exception.PortalException
getSocialUsersCount(long, int, String)
userId
- the primary key of the usersocialRelationType
- the type of social relation. The possible
types can be found in SocialRelationConstants
.com.liferay.portal.kernel.exception.PortalException
public int getSocialUsersCount(long userId, int socialRelationType, String socialRelationTypeComparator) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the usersocialRelationType
- the type of social relation. The possible
types can be found in SocialRelationConstants
.com.liferay.portal.kernel.exception.PortalException
public int getSocialUsersCount(long userId1, long userId2) throws com.liferay.portal.kernel.exception.PortalException
userId1
- the primary key of the first useruserId2
- the primary key of the second usercom.liferay.portal.kernel.exception.PortalException
public int getSocialUsersCount(long userId1, long userId2, int socialRelationType) throws com.liferay.portal.kernel.exception.PortalException
userId1
- the primary key of the first useruserId2
- the primary key of the second usersocialRelationType
- the type of social relation. The possible
types can be found in SocialRelationConstants
.com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User getUserByContactId(long contactId) throws com.liferay.portal.kernel.exception.PortalException
contactId
- the user's contact IDcom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User getUserByEmailAddress(long companyId, String emailAddress) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyemailAddress
- the user's email addresscom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User getUserByFacebookId(long companyId, long facebookId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyfacebookId
- the user's Facebook IDcom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User getUserByGoogleUserId(long companyId, String googleUserId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companygoogleUserId
- the user's Google user IDcom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User getUserById(long userId) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the usercom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User getUserById(long companyId, long userId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyuserId
- the primary key of the usercom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User getUserByOpenId(long companyId, String openId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyopenId
- the user's OpenIDcom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User getUserByPortraitId(long portraitId) throws com.liferay.portal.kernel.exception.PortalException
portraitId
- the user's portrait IDcom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User getUserByScreenName(long companyId, String screenName) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyscreenName
- the user's screen namecom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User getUserByUuidAndCompanyId(String uuid, long companyId) throws com.liferay.portal.kernel.exception.PortalException
getUserByUuidAndCompanyId
in interface com.liferay.portal.kernel.service.UserLocalService
getUserByUuidAndCompanyId
in class UserLocalServiceBaseImpl
uuid
- the user's UUIDcompanyId
- the primary key of the user's companycom.liferay.portal.kernel.exception.PortalException
- if a matching user could not be foundpublic int getUserGroupUsersCount(long userGroupId, int status) throws com.liferay.portal.kernel.exception.PortalException
userGroupId
- the primary key of the user groupstatus
- the workflow statuscom.liferay.portal.kernel.exception.PortalException
public long getUserIdByEmailAddress(long companyId, String emailAddress) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyemailAddress
- the user's email addresscom.liferay.portal.kernel.exception.PortalException
public long getUserIdByScreenName(long companyId, String screenName) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyscreenName
- the user's screen namecom.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.User> getUsers(long companyId, boolean defaultUser, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
public int getUsersCount(long companyId, boolean defaultUser, int status)
public boolean hasPasswordPolicyUser(long passwordPolicyId, long userId)
true
if the password policy has been assigned to the
user.passwordPolicyId
- the primary key of the password policyuserId
- the primary key of the usertrue
if the password policy is assigned to the user;
false
otherwisepublic boolean hasRoleUser(long companyId, String name, long userId, boolean inherited) throws com.liferay.portal.kernel.exception.PortalException
true
if the user has the role with the name,
optionally through inheritance.companyId
- the primary key of the role's companyname
- the name of the role (must be a regular role, not an
organization, site or provider role)userId
- the primary key of the userinherited
- whether to include roles inherited from organizations,
sites, etc.true
if the user has the role; false
otherwisecom.liferay.portal.kernel.exception.PortalException
public boolean isPasswordExpired(com.liferay.portal.kernel.model.User user) throws com.liferay.portal.kernel.exception.PortalException
true
if the user's password is expired.user
- the usertrue
if the user's password is expired;
false
otherwisecom.liferay.portal.kernel.exception.PortalException
@Deprecated public boolean isPasswordExpiringSoon(com.liferay.portal.kernel.model.User user) throws com.liferay.portal.kernel.exception.PortalException
true
if the password policy is configured to warn
the user that his password is expiring and the remaining time until
expiration is equal or less than the configured warning time.user
- the usertrue
if the user's password is expiring soon;
false
otherwisecom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User loadGetDefaultUser(long companyId) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the companycom.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.User> search(long companyId, String keywords, int status, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
search(long, String, int, LinkedHashMap, int, int, Sort)
instead of this method wherever possible for performance reasons.
Useful when paginating results. Returns a maximum of end -
start
instances. start
and end
are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full
result set.
companyId
- the primary key of the user's companykeywords
- the keywords (space separated), which may occur in the
user's first name, middle name, last name, screen name, or email
addressstatus
- the workflow statusparams
- the finder parameters (optionally null
). For
more information see UserFinder
.start
- the lower bound of the range of usersend
- the upper bound of the range of users (not inclusive)obc
- the comparator to order the users by (optionally
null
)UserFinder
public com.liferay.portal.kernel.search.Hits search(long companyId, String keywords, int status, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.search.Sort sort)
Useful when paginating results. Returns a maximum of end -
start
instances. start
and end
are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full
result set.
companyId
- the primary key of the user's companykeywords
- the keywords (space separated), which may occur in the
user's first name, middle name, last name, screen name, or email
addressstatus
- the workflow statusparams
- the indexer parameters (optionally null
). For
more information see UserIndexer
.start
- the lower bound of the range of usersend
- the upper bound of the range of users (not inclusive)sort
- the field and direction to sort by (optionally
null
)UserIndexer
public com.liferay.portal.kernel.search.Hits search(long companyId, String keywords, int status, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.search.Sort[] sorts)
public List<com.liferay.portal.kernel.model.User> search(long companyId, String firstName, String middleName, String lastName, String screenName, String emailAddress, int status, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
search(long, String,
String, String, String, String, int, LinkedHashMap, boolean, int, int,
Sort)
instead of this method wherever possible for performance reasons.
Useful when paginating results. Returns a maximum of end -
start
instances. start
and end
are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full
result set.
companyId
- the primary key of the user's companyfirstName
- the first name keywords (space separated)middleName
- the middle name keywordslastName
- the last name keywordsscreenName
- the screen name keywordsemailAddress
- the email address keywordsstatus
- the workflow statusparams
- the finder parameters (optionally null
). For
more information see UserFinder
.andSearch
- whether every field must match its keywords, or just
one field. For example, "users with the first name 'bob' and
last name 'smith'" vs "users with the first name 'bob'
or the last name 'smith'".start
- the lower bound of the range of usersend
- the upper bound of the range of users (not inclusive)obc
- the comparator to order the users by (optionally
null
)UserFinder
public com.liferay.portal.kernel.search.Hits search(long companyId, String firstName, String middleName, String lastName, String screenName, String emailAddress, int status, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, com.liferay.portal.kernel.search.Sort sort)
Useful when paginating results. Returns a maximum of end -
start
instances. start
and end
are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full
result set.
companyId
- the primary key of the user's companyfirstName
- the first name keywords (space separated)middleName
- the middle name keywordslastName
- the last name keywordsscreenName
- the screen name keywordsemailAddress
- the email address keywordsstatus
- the workflow statusparams
- the indexer parameters (optionally null
). For
more information see UserIndexer
.andSearch
- whether every field must match its keywords, or just
one field. For example, "users with the first name 'bob' and
last name 'smith'" vs "users with the first name 'bob'
or the last name 'smith'".start
- the lower bound of the range of usersend
- the upper bound of the range of users (not inclusive)sort
- the field and direction to sort by (optionally
null
)UserIndexer
public com.liferay.portal.kernel.search.Hits search(long companyId, String firstName, String middleName, String lastName, String screenName, String emailAddress, int status, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, com.liferay.portal.kernel.search.Sort[] sorts)
public int searchCount(long companyId, String keywords, int status, LinkedHashMap<String,Object> params)
companyId
- the primary key of the user's companykeywords
- the keywords (space separated), which may occur in the
user's first name, middle name, last name, screen name, or email
addressstatus
- the workflow statusparams
- the finder parameters (optionally null
). For
more information see UserFinder
.public int searchCount(long companyId, String firstName, String middleName, String lastName, String screenName, String emailAddress, int status, LinkedHashMap<String,Object> params, boolean andSearch)
companyId
- the primary key of the user's companyfirstName
- the first name keywords (space separated)middleName
- the middle name keywordslastName
- the last name keywordsscreenName
- the screen name keywordsemailAddress
- the email address keywordsstatus
- the workflow statusparams
- the finder parameters (optionally null
). For
more information see UserFinder
.andSearch
- whether every field must match its keywords, or just
one field. For example, "users with the first name 'bob' and
last name 'smith'" vs "users with the first name 'bob'
or the last name 'smith'".public Map<Long,Integer> searchCounts(long companyId, int status, long[] groupIds)
public List<com.liferay.portal.kernel.model.User> searchSocial(long userId, int[] socialRelationTypes, String keywords, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public List<com.liferay.portal.kernel.model.User> searchSocial(long companyId, long[] groupIds, String keywords, int start, int end)
public List<com.liferay.portal.kernel.model.User> searchSocial(long[] groupIds, long userId, int[] socialRelationTypes, String keywords, int start, int end) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> searchUsers(long companyId, String keywords, int status, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> searchUsers(long companyId, String keywords, int status, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.search.Sort[] sorts) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> searchUsers(long companyId, String firstName, String middleName, String lastName, String screenName, String emailAddress, int status, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, com.liferay.portal.kernel.search.Sort sort) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> searchUsers(long companyId, String firstName, String middleName, String lastName, String screenName, String emailAddress, int status, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, com.liferay.portal.kernel.search.Sort[] sorts) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public void sendEmailAddressVerification(com.liferay.portal.kernel.model.User user, String emailAddress, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
user
- the verification email recipientemailAddress
- the recipient's email addressserviceContext
- the service context to be applied. Must set the
portal URL, main path, primary key of the layout, remote address,
remote host, and agent for the user.com.liferay.portal.kernel.exception.PortalException
public boolean sendPassword(long companyId, String emailAddress, String fromName, String fromAddress, String subject, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
portal.properties
with the
admin.email.password
keys.companyId
- the primary key of the user's companyemailAddress
- the user's email addressfromName
- the name of the individual that the email should be fromfromAddress
- the address of the individual that the email should be
fromsubject
- the email subject. If null
, the subject
specified in portal.properties
will be used.body
- the email body. If null
, the body specified in
portal.properties
will be used.serviceContext
- the service context to be appliedcom.liferay.portal.kernel.exception.PortalException
public boolean sendPasswordByEmailAddress(long companyId, String emailAddress) throws com.liferay.portal.kernel.exception.PortalException
The content of the notification email is specified with the
admin.email.password
portal property keys. They can be
overridden via a portal-ext.properties
file or modified
through the Portal Settings UI.
companyId
- the primary key of the user's companyemailAddress
- the user's email addresstrue
if the notification email includes a new
password; false
if the notification email only
contains a reset linkcom.liferay.portal.kernel.exception.PortalException
public boolean sendPasswordByScreenName(long companyId, String screenName) throws com.liferay.portal.kernel.exception.PortalException
The content of the notification email is specified with the
admin.email.password
portal property keys. They can be
overridden via a portal-ext.properties
file or modified
through the Portal Settings UI.
companyId
- the primary key of the user's companyscreenName
- the user's screen nametrue
if the notification email includes a new
password; false
if the notification email only
contains a reset linkcom.liferay.portal.kernel.exception.PortalException
public boolean sendPasswordByUserId(long userId) throws com.liferay.portal.kernel.exception.PortalException
The content of the notification email is specified with the
admin.email.password
portal property keys. They can be
overridden via a portal-ext.properties
file or modified
through the Portal Settings UI.
userId
- the user's primary keytrue
if the notification email includes a new
password; false
if the notification email only
contains a reset linkcom.liferay.portal.kernel.exception.PortalException
public void setRoleUsers(long roleId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException
setRoleUsers
in interface com.liferay.portal.kernel.service.UserLocalService
setRoleUsers
in class UserLocalServiceBaseImpl
roleId
- the primary key of the roleuserIds
- the primary keys of the userscom.liferay.portal.kernel.exception.PortalException
public void setUserGroupUsers(long userGroupId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException
setUserGroupUsers
in interface com.liferay.portal.kernel.service.UserLocalService
setUserGroupUsers
in class UserLocalServiceBaseImpl
userGroupId
- the primary key of the user groupuserIds
- the primary keys of the userscom.liferay.portal.kernel.exception.PortalException
public void unsetGroupTeamsUsers(long groupId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException
groupId
- the primary key of the groupuserIds
- the primary keys of the userscom.liferay.portal.kernel.exception.PortalException
public void unsetGroupUsers(long groupId, long[] userIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
groupId
- the primary key of the groupuserIds
- the primary keys of the usersserviceContext
- the service context to be applied (optionally
null
)com.liferay.portal.kernel.exception.PortalException
public void unsetOrganizationUsers(long organizationId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException
organizationId
- the primary key of the organizationuserIds
- the primary keys of the userscom.liferay.portal.kernel.exception.PortalException
public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
passwordPolicyId
- the primary key of the password policyuserIds
- the primary keys of the userspublic void unsetRoleUsers(long roleId, List<com.liferay.portal.kernel.model.User> users) throws com.liferay.portal.kernel.exception.PortalException
roleId
- the primary key of the roleusers
- the userscom.liferay.portal.kernel.exception.PortalException
public void unsetRoleUsers(long roleId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException
roleId
- the primary key of the roleuserIds
- the primary keys of the userscom.liferay.portal.kernel.exception.PortalException
public void unsetTeamUsers(long teamId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException
teamId
- the primary key of the teamuserIds
- the primary keys of the userscom.liferay.portal.kernel.exception.PortalException
public void unsetUserGroupUsers(long userGroupId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException
userGroupId
- the primary key of the user groupuserIds
- the primary keys of the userscom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateAgreedToTermsOfUse(long userId, boolean agreedToTermsOfUse) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the useragreedToTermsOfUse
- whether the user has agreet to the terms of
usecom.liferay.portal.kernel.exception.PortalException
public void updateAsset(long userId, com.liferay.portal.kernel.model.User user, long[] assetCategoryIds, String[] assetTagNames) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the useruser
- ID the primary key of the userassetCategoryIds
- the primary key's of the new asset categoriesassetTagNames
- the new asset tag namescom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateCreateDate(long userId, Date createDate) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the usercreateDate
- the new creation datecom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateEmailAddress(long userId, String password, String emailAddress1, String emailAddress2) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the userpassword
- the user's passwordemailAddress1
- the user's new email addressemailAddress2
- the user's new email address confirmationcom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateEmailAddress(long userId, String password, String emailAddress1, String emailAddress2, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the userpassword
- the user's passwordemailAddress1
- the user's new email addressemailAddress2
- the user's new email address confirmationserviceContext
- the service context to be applied. Must set the
portal URL, main path, primary key of the layout, remote address,
remote host, and agent for the user.com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateEmailAddressVerified(long userId, boolean emailAddressVerified) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the useremailAddressVerified
- whether the user has verified email addresscom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateFacebookId(long userId, long facebookId) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the userfacebookId
- the user's new Facebook IDcom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateGoogleUserId(long userId, String googleUserId) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the usergoogleUserId
- the new Google user IDcom.liferay.portal.kernel.exception.PortalException
public void updateGroups(long userId, long[] newGroupIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the usernewGroupIds
- the primary keys of the groupsserviceContext
- the service context to be applied (optionally
null
)com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateIncompleteUser(long creatorUserId, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, boolean updateUserInformation, boolean sendEmail, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
creatorUserId
- the primary key of the creatorcompanyId
- the primary key of the user's companyautoPassword
- whether a password should be automatically generated
for the userpassword1
- the user's passwordpassword2
- the user's password confirmationautoScreenName
- whether a screen name should be automatically
generated for the userscreenName
- the user's screen nameemailAddress
- the user's email addressfacebookId
- the user's facebook IDopenId
- the user's OpenIDlocale
- the user's localefirstName
- the user's first namemiddleName
- the user's middle namelastName
- the user's last nameprefixId
- the user's name prefix IDsuffixId
- the user's name suffix IDmale
- whether the user is malebirthdayMonth
- the user's birthday month (0-based, meaning 0 for
January)birthdayDay
- the user's birthday daybirthdayYear
- the user's birthday yearjobTitle
- the user's job titleupdateUserInformation
- whether to update the user's informationsendEmail
- whether to send the user an email notification about
their new accountserviceContext
- the service context to be applied (optionally
null
). Can set expando bridge attributes for the
user.com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateJobTitle(long userId, String jobTitle) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the userjobTitle
- the user's job titlecom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateLastLogin(long userId, String loginIP) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the userloginIP
- the IP address the user logged in fromcom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateLockout(com.liferay.portal.kernel.model.User user, boolean lockout) throws com.liferay.portal.kernel.exception.PortalException
user
- the userlockout
- whether the user is locked outcom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateLockoutByEmailAddress(long companyId, String emailAddress, boolean lockout) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyemailAddress
- the user's email addresslockout
- whether the user is locked outcom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateLockoutById(long userId, boolean lockout) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the userlockout
- whether the user is locked outcom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateLockoutByScreenName(long companyId, String screenName, boolean lockout) throws com.liferay.portal.kernel.exception.PortalException
companyId
- the primary key of the user's companyscreenName
- the user's screen namelockout
- whether the user is locked outcom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateModifiedDate(long userId, Date modifiedDate) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the usermodifiedDate
- the new modified datecom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateOpenId(long userId, String openId) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the useropenId
- the new OpenIDcom.liferay.portal.kernel.exception.PortalException
public void updateOrganizations(long userId, long[] newOrganizationIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the usernewOrganizationIds
- the primary keys of the organizationsserviceContext
- the service context to be applied. Must set whether
user indexing is enabled.com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updatePassword(long userId, String password1, String password2, boolean passwordReset) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the userpassword1
- the user's new passwordpassword2
- the user's new password confirmationpasswordReset
- whether the user should be asked to reset their
password the next time they log incom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updatePassword(long userId, String password1, String password2, boolean passwordReset, boolean silentUpdate) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the userpassword1
- the user's new passwordpassword2
- the user's new password confirmationpasswordReset
- whether the user should be asked to reset their
password the next time they loginsilentUpdate
- whether the password should be updated without being
tracked, or validated. Primarily used for password imports.com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updatePasswordManually(long userId, String password, boolean passwordEncrypted, boolean passwordReset, Date passwordModifiedDate) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the userpassword
- the user's new passwordpasswordEncrypted
- the user's new encrypted passwordpasswordReset
- whether the user should be asked to reset their
password the next time they loginpasswordModifiedDate
- the new password modified datecom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updatePasswordReset(long userId, boolean passwordReset) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the userpasswordReset
- whether the user should be asked to reset their
password the next time they logincom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updatePortrait(long userId, byte[] bytes) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the userbytes
- the new portrait image datacom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateReminderQuery(long userId, String question, String answer) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the userquestion
- the user's new password reset questionanswer
- the user's new password reset answercom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateScreenName(long userId, String screenName) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the userscreenName
- the user's new screen namecom.liferay.portal.kernel.exception.PortalException
@Deprecated public com.liferay.portal.kernel.model.User updateStatus(long userId, int status) throws com.liferay.portal.kernel.exception.PortalException
updateStatus(long, int, ServiceContext)
userId
- the primary key of the userstatus
- the user's new workflow statuscom.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateStatus(long userId, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the userstatus
- the user's new workflow statusserviceContext
- the service context to be applied. You can specify
an unencrypted custom password (used by an LDAP listener) for the
user via attribute passwordUnencrypted
.com.liferay.portal.kernel.exception.PortalException
public com.liferay.portal.kernel.model.User updateUser(long userId, String oldPassword, String newPassword1, String newPassword2, boolean passwordReset, String reminderQueryQuestion, String reminderQueryAnswer, String screenName, String emailAddress, long facebookId, String openId, boolean portrait, byte[] portraitBytes, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String facebookSn, String jabberSn, String skypeSn, String twitterSn, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, List<com.liferay.portal.kernel.model.UserGroupRole> userGroupRoles, long[] userGroupIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
userId
- the primary key of the useroldPassword
- the user's old passwordnewPassword1
- the user's new password (optionally
null
)newPassword2
- the user's new password confirmation (optionally
null
)passwordReset
- whether the user should be asked to reset their
password the next time they loginreminderQueryQuestion
- the user's new password reset questionreminderQueryAnswer
- the user's new password reset answerscreenName
- the user's new screen nameemailAddress
- the user's new email addressfacebookId
- the user's new Facebook IDopenId
- the user's new OpenIDportrait
- whether to update the user's portrait imageportraitBytes
- the new portrait image datalanguageId
- the user's new language IDtimeZoneId
- the user's new time zone IDgreeting
- the user's new greetingcomments
- the user's new commentsfirstName
- the user's new first namemiddleName
- the user's new middle namelastName
- the user's new last nameprefixId
- the user's new name prefix IDsuffixId
- the user's new name suffix IDmale
- whether user is malebirthdayMonth
- the user's new birthday month (0-based, meaning 0
for January)birthdayDay
- the user's new birthday daybirthdayYear
- the user's birthday yearsmsSn
- the user's new SMS screen namefacebookSn
- the user's new Facebook screen namejabberSn
- the user's new Jabber screen nameskypeSn
- the user's new Skype screen nametwitterSn
- the user's new Twitter screen namejobTitle
- the user's new job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the user's rolesuserGroupRoles
- the user user's group rolesuserGroupIds
- the primary keys of the user's user groupsserviceContext
- the service context to be applied (optionally
null
). Can set the UUID (with the uuid
attribute), asset category IDs, asset tag names, and expando
bridge attributes for the user.com.liferay.portal.kernel.exception.PortalException
@Deprecated public com.liferay.portal.kernel.model.User updateUser(long userId, String oldPassword, String newPassword1, String newPassword2, boolean passwordReset, String reminderQueryQuestion, String reminderQueryAnswer, String screenName, String emailAddress, long facebookId, String openId, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String facebookSn, String jabberSn, String skypeSn, String twitterSn, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, List<com.liferay.portal.kernel.model.UserGroupRole> userGroupRoles, long[] userGroupIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
updateUser(long, String, String, String, boolean, String,
String, String, String, long, String, boolean, byte[],
String, String, String, String, String, String, String, long,
long, boolean, int, int, int, String, String, String, String,
String, String, long[], long[], long[], List, long[],
ServiceContext)
userId
- the primary key of the useroldPassword
- the user's old passwordnewPassword1
- the user's new password (optionally
null
)newPassword2
- the user's new password confirmation (optionally
null
)passwordReset
- whether the user should be asked to reset their
password the next time they loginreminderQueryQuestion
- the user's new password reset questionreminderQueryAnswer
- the user's new password reset answerscreenName
- the user's new screen nameemailAddress
- the user's new email addressfacebookId
- the user's new Facebook IDopenId
- the user's new OpenIDlanguageId
- the user's new language IDtimeZoneId
- the user's new time zone IDgreeting
- the user's new greetingcomments
- the user's new commentsfirstName
- the user's new first namemiddleName
- the user's new middle namelastName
- the user's new last nameprefixId
- the user's new name prefix IDsuffixId
- the user's new name suffix IDmale
- whether user is malebirthdayMonth
- the user's new birthday month (0-based, meaning
0 for January)birthdayDay
- the user's new birthday daybirthdayYear
- the user's birthday yearsmsSn
- the user's new SMS screen namefacebookSn
- the user's new Facebook screen namejabberSn
- the user's new Jabber screen nameskypeSn
- the user's new Skype screen nametwitterSn
- the user's new Twitter screen namejobTitle
- the user's new job titlegroupIds
- the primary keys of the user's groupsorganizationIds
- the primary keys of the user's organizationsroleIds
- the primary keys of the user's rolesuserGroupRoles
- the user user's group rolesuserGroupIds
- the primary keys of the user's user groupsserviceContext
- the service context to be applied (optionally
null
). Can set the UUID (with the
uuid
attribute), asset category IDs, asset tag
names, and expando bridge attributes for the user.com.liferay.portal.kernel.exception.PortalException
public void verifyEmailAddress(String ticketKey) throws com.liferay.portal.kernel.exception.PortalException
ticketKey
- the ticket keycom.liferay.portal.kernel.exception.PortalException
protected void addDefaultRolesAndTeams(long groupId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected int authenticate(long companyId, String login, String password, String authType, Map<String,String[]> headerMap, Map<String,String[]> parameterMap, Map<String,Object> resultsMap) throws com.liferay.portal.kernel.exception.PortalException
Authentication type specifies what login
contains.The valid
values are:
CompanyConstants.AUTH_TYPE_EA
- login
is the
user's email address
CompanyConstants.AUTH_TYPE_SN
- login
is the
user's screen name
CompanyConstants.AUTH_TYPE_ID
- login
is the
user's primary key
companyId
- the primary key of the user's companylogin
- either the user's email address, screen name, or primary
key depending on the value of authType
password
- the user's passwordauthType
- the type of authentication to performheaderMap
- the header map from the authentication requestparameterMap
- the parameter map from the authentication requestresultsMap
- the map of authentication results (may be nil). After
a successful authentication the user's primary key will be placed
under the key userId
.Authenticator.FAILURE
indicating that the user's credentials are
invalid, Authenticator.SUCCESS
indicating a successful
login, or Authenticator.DNE
indicating that a user with
that login does not exist.com.liferay.portal.kernel.exception.PortalException
AuthPipeline
protected com.liferay.portal.kernel.search.SearchContext buildSearchContext(long companyId, String firstName, String middleName, String lastName, String fullName, String screenName, String emailAddress, String street, String city, String zip, String region, String country, int status, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, com.liferay.portal.kernel.search.Sort[] sorts)
protected com.liferay.portal.kernel.model.User doCheckLockout(com.liferay.portal.kernel.model.User user, com.liferay.portal.kernel.model.PasswordPolicy passwordPolicy) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected com.liferay.portal.kernel.model.User doCheckPasswordExpired(com.liferay.portal.kernel.model.User user, com.liferay.portal.kernel.model.PasswordPolicy passwordPolicy) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected Date getBirthday(int birthdayMonth, int birthdayDay, int birthdayYear) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected String getLogin(String login)
protected com.liferay.portal.kernel.search.Sort[] getSorts(com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
protected int handleAuthenticationFailure(String login, String authType, com.liferay.portal.kernel.model.User user, Map<String,String[]> headerMap, Map<String,String[]> parameterMap)
protected boolean isUseCustomSQL(LinkedHashMap<String,Object> params)
protected boolean isUserAllowedToAuthenticate(com.liferay.portal.kernel.model.User user) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void notifyUser(com.liferay.portal.kernel.model.User user, String password, com.liferay.portal.kernel.service.ServiceContext serviceContext)
protected void reindex(List<com.liferay.portal.kernel.model.User> users) throws com.liferay.portal.kernel.search.SearchException
com.liferay.portal.kernel.search.SearchException
protected void reindex(long userId) throws com.liferay.portal.kernel.search.SearchException
com.liferay.portal.kernel.search.SearchException
protected void reindex(long[] userIds) throws com.liferay.portal.kernel.search.SearchException
com.liferay.portal.kernel.search.SearchException
protected void reindex(com.liferay.portal.kernel.model.User user) throws com.liferay.portal.kernel.search.SearchException
com.liferay.portal.kernel.search.SearchException
protected com.liferay.portal.kernel.model.User resetFailedLoginAttempts(com.liferay.portal.kernel.model.User user)
protected com.liferay.portal.kernel.model.User resetFailedLoginAttempts(com.liferay.portal.kernel.model.User user, boolean forceUpdate)
protected com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> searchUsers(com.liferay.portal.kernel.search.SearchContext searchContext) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void sendPasswordNotification(com.liferay.portal.kernel.model.User user, long companyId, String newPassword, String passwordResetURL, String fromName, String fromAddress, String subject, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext)
protected void setEmailAddress(com.liferay.portal.kernel.model.User user, String password, String firstName, String middleName, String lastName, String emailAddress) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void trackPassword(com.liferay.portal.kernel.model.User user) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void updateGroups(long userId, long[] newGroupIds, com.liferay.portal.kernel.service.ServiceContext serviceContext, boolean indexingEnabled) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void updateOrganizations(long userId, long[] newOrganizationIds, boolean indexingEnabled) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void updateUserGroupRoles(com.liferay.portal.kernel.model.User user, long[] groupIds, long[] organizationIds, List<com.liferay.portal.kernel.model.UserGroupRole> userGroupRoles, List<com.liferay.portal.kernel.model.UserGroupRole> previousUserGroupRoles) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void validate(long companyId, long userId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, String openId, String firstName, String middleName, String lastName, long[] organizationIds, Locale locale) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void validate(long userId, String screenName, String emailAddress, String openId, String firstName, String middleName, String lastName, String smsSn, Locale locale) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void validateCompanyMaxUsers(long companyId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void validateEmailAddress(long companyId, String emailAddress) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void validateEmailAddress(com.liferay.portal.kernel.model.User user, String emailAddress1, String emailAddress2) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void validateFullName(long companyId, String firstName, String middleName, String lastName, Locale locale) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void validateGoogleUserId(long companyId, long userId, String googleUserId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void validateOpenId(long companyId, long userId, String openId) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void validatePassword(long companyId, long userId, String password1, String password2) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void validateReminderQuery(String question, String answer) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
protected void validateScreenName(long companyId, long userId, String screenName) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException