Class UserLocalServiceImpl
- All Implemented Interfaces:
com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService,com.liferay.portal.kernel.service.BaseLocalService,com.liferay.portal.kernel.service.change.tracking.CTService<com.liferay.portal.kernel.model.User>,com.liferay.portal.kernel.service.PersistedModelLocalService,com.liferay.portal.kernel.service.UserLocalService
- Author:
- Brian Wing Shun Chan, Scott Lee, Raymond Augé, Jorge Ferrer, Julio Camarero, Wesley Gong, Zsigmond Rab
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.liferay.mail.kernel.service.MailServiceFields inherited from class com.liferay.portal.service.base.UserLocalServiceBaseImpl
counterLocalService, groupPersistence, organizationPersistence, rolePersistence, teamPersistence, userFinder, userGroupPersistence, userLocalService, userPersistence -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.liferay.portal.kernel.model.UseraddDefaultAdminUser(long companyId, String password, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName) Adds a default admin user for the company.booleanaddDefaultGroups(long userId) Adds the user to the default groups, unless the user is already in these groups.booleanaddDefaultRoles(long userId) Adds the user to the default regular roles, unless the user already has these regular roles.protected voidaddDefaultRolesAndTeams(long groupId, long[] userIds) com.liferay.portal.kernel.model.UseraddDefaultServiceAccountUser(long companyId) booleanaddDefaultUserGroups(long userId) Adds the user to the default user groups, unless the user is already in these user groups.booleanaddGroupUser(long groupId, long userId) Adds the user to the group.booleanaddGroupUser(long groupId, com.liferay.portal.kernel.model.User user) Adds the user to the group.booleanaddGroupUsers(long groupId, long[] userIds) Adds the users to the group.booleanaddGroupUsers(long groupId, List<com.liferay.portal.kernel.model.User> users) Adds the users to the group.booleanaddOrganizationUser(long organizationId, long userId) Adds the user to the organization.booleanaddOrganizationUser(long organizationId, com.liferay.portal.kernel.model.User user) Adds the user to the organization.booleanaddOrganizationUsers(long organizationId, long[] userIds) Adds the users to the organization.booleanaddOrganizationUsers(long organizationId, List<com.liferay.portal.kernel.model.User> users) Adds the users to the organization.com.liferay.portal.kernel.model.UseraddOrUpdateUser(String externalReferenceCode, long creatorUserId, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, boolean sendEmail, com.liferay.portal.kernel.service.ServiceContext serviceContext) voidaddPasswordPolicyUsers(long passwordPolicyId, long[] userIds) Assigns the password policy to the users, removing any other currently assigned password policies.booleanaddRoleUser(long roleId, long userId) Adds the user to the role.booleanaddRoleUser(long roleId, com.liferay.portal.kernel.model.User user) Adds the user to the role.booleanaddRoleUsers(long roleId, long[] userIds) Adds the users to the role.booleanaddRoleUsers(long roleId, List<com.liferay.portal.kernel.model.User> users) Adds the users to the role.booleanaddTeamUser(long teamId, long userId) Adds the user to the team.booleanaddTeamUser(long teamId, com.liferay.portal.kernel.model.User user) Adds the user to the team.booleanaddTeamUsers(long teamId, long[] userIds) Adds the users to the team.booleanaddTeamUsers(long teamId, List<com.liferay.portal.kernel.model.User> users) Adds the users to the team.com.liferay.portal.kernel.model.UseraddUser(long creatorUserId, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, int type, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, com.liferay.portal.kernel.service.ServiceContext serviceContext) Adds a user.booleanaddUserGroupUser(long userGroupId, long userId) Adds the user to the user group.booleanaddUserGroupUser(long userGroupId, com.liferay.portal.kernel.model.User user) Adds the user to the user group.booleanaddUserGroupUsers(long userGroupId, long[] userIds) Adds the users to the user group.booleanaddUserGroupUsers(long userGroupId, List<com.liferay.portal.kernel.model.User> users) Adds the users to the user group.com.liferay.portal.kernel.model.UseraddUserWithWorkflow(long creatorUserId, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, int type, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, com.liferay.portal.kernel.service.ServiceContext serviceContext) Adds a user with workflow.voidprotected intauthenticate(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.intauthenticateByEmailAddress(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.intauthenticateByScreenName(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.intauthenticateByUserId(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.longauthenticateForBasic(long companyId, String authType, String login, String password) Attempts to authenticate the user using HTTP basic access authentication, without using the AuthPipeline.longauthenticateForDigest(long companyId, String userName, String realm, String nonce, String method, String uri, String response) Deprecated.As of Cavanaugh (7.4.x), with no direct replacementprotected com.liferay.portal.kernel.search.SearchContextbuildSearchContext(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) voidcheckLockout(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.voidcheckLoginFailure(com.liferay.portal.kernel.model.User user) Adds a failed login attempt to the user and updates the user's last failed login date.voidcheckLoginFailureByEmailAddress(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.voidcheckLoginFailureById(long userId) Adds a failed login attempt to the user and updates the user's last failed login date.voidcheckLoginFailureByScreenName(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.voidcheckPasswordExpired(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.voidcompleteUserRegistration(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.voiddeletePortrait(long userId) Deletes the user's portrait image.voiddeleteRoleUser(long roleId, long userId) Removes the user from the role.com.liferay.portal.kernel.model.UserdeleteUser(long userId) Deletes the user.com.liferay.portal.kernel.model.UserdeleteUser(com.liferay.portal.kernel.model.User user) Deletes the user.voiddeleteUserGroupUser(long userGroupId, long userId) Removes the user from the user group.voiddestroy()protected com.liferay.portal.kernel.model.UserdoCheckLockout(com.liferay.portal.kernel.model.User user, com.liferay.portal.kernel.model.PasswordPolicy passwordPolicy) protected com.liferay.portal.kernel.model.UserdoCheckPasswordExpired(com.liferay.portal.kernel.model.User user, com.liferay.portal.kernel.model.PasswordPolicy passwordPolicy) encryptUserId(String name) Encrypts the primary key of the user.com.liferay.portal.kernel.model.UserfetchGuestUser(long companyId) Returns the guest user for the company.com.liferay.portal.kernel.model.UserfetchUserByContactId(long contactId) Returns the user with the contact ID.com.liferay.portal.kernel.model.UserfetchUserByEmailAddress(long companyId, String emailAddress) Returns the user with the email address.com.liferay.portal.kernel.model.UserfetchUserByFacebookId(long companyId, long facebookId) Deprecated.As of Athanasius (7.3.x), with no direct replacementcom.liferay.portal.kernel.model.UserfetchUserByGoogleUserId(long companyId, String googleUserId) Returns the user with the Google user ID.com.liferay.portal.kernel.model.UserfetchUserById(long userId) Returns the user with the primary key.com.liferay.portal.kernel.model.UserfetchUserByOpenId(long companyId, String openId) Deprecated.As of Athanasius (7.3.x), with no direct replacementcom.liferay.portal.kernel.model.UserfetchUserByPortraitId(long portraitId) Returns the user with the portrait ID.com.liferay.portal.kernel.model.UserfetchUserByScreenName(long companyId, String screenName) Returns the user with the screen name.protected DategetBirthday(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.intgetCompanyUsersCount(long companyId) Returns the number of users belonging to the company.com.liferay.portal.kernel.model.UsergetDefaultUser(long companyId) Deprecated.As of Cavanaugh (7.4.x), replaced bygetGuestUser(long)longgetDefaultUserId(long companyId) Deprecated.As of Cavanaugh (7.4.x), replaced bygetGuestUserId(long)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> orderByComparator) 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> orderByComparator) Returns the users belonging to a group.intgetGroupUsersCount(long groupId, int status) Returns the number of users with the status belonging to the group.com.liferay.portal.kernel.model.UsergetGuestUser(long companyId) Returns the guest user for the company.longgetGuestUserId(long companyId) Returns the primary key of the guest user for the company.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> orderByComparator) protected StringList<com.liferay.portal.kernel.model.User>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>Returns all the users who do not belong to any groups, excluding the default user.intgetOrganizationsAndUserGroupsUsersCount(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> orderByComparator) 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> orderByComparator) Returns the users belonging to the organization with the status.intgetOrganizationUsersCount(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.long[]getRoleUserIds(long roleId, long type) intgetRoleUsersCount(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, String socialRelationTypeComparator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> orderByComparator) 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> orderByComparator) 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> orderByComparator) Returns an ordered range of all the users with a mutual social relation with both of the given users.intgetSocialUsersCount(long userId, int socialRelationType, String socialRelationTypeComparator) Returns the number of users with a social relation with the user.intgetSocialUsersCount(long userId1, long userId2) Returns the number of users with a mutual social relation with both of the given users.intgetSocialUsersCount(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> orderByComparator) com.liferay.portal.kernel.model.UsergetUserByContactId(long contactId) Returns the user with the contact ID.com.liferay.portal.kernel.model.UsergetUserByEmailAddress(long companyId, String emailAddress) Returns the user with the email address.com.liferay.portal.kernel.model.UsergetUserByFacebookId(long companyId, long facebookId) Deprecated.As of Athanasius (7.3.x), with no direct replacementcom.liferay.portal.kernel.model.UsergetUserByGoogleUserId(long companyId, String googleUserId) Returns the user with the Google user ID.com.liferay.portal.kernel.model.UsergetUserById(long userId) Returns the user with the primary key.com.liferay.portal.kernel.model.UsergetUserById(long companyId, long userId) Returns the user with the primary key from the company.com.liferay.portal.kernel.model.UsergetUserByOpenId(long companyId, String openId) Deprecated.As of Athanasius (7.3.x), with no direct replacementcom.liferay.portal.kernel.model.UsergetUserByPortraitId(long portraitId) Returns the user with the portrait ID.com.liferay.portal.kernel.model.UsergetUserByScreenName(long companyId, String screenName) Returns the user with the screen name.intgetUserGroupUsersCount(long userGroupId, int status) Returns the number of users with the status belonging to the user group.longgetUserIdByEmailAddress(long companyId, String emailAddress) Returns the primary key of the user with the email address.longgetUserIdByScreenName(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, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> orderByComparator) List<com.liferay.portal.kernel.model.User>getUsersByRoleId(long roleId, int start, int end) List<com.liferay.portal.kernel.model.User>getUsersByRoleName(long companyId, String roleName, int start, int end) intgetUsersCount(long companyId, int status) protected inthandleAuthenticationFailure(long companyId, String authType, String login, com.liferay.portal.kernel.model.User user, Map<String, String[]> headerMap, Map<String, String[]> parameterMap) booleanhasPasswordPolicyUser(long passwordPolicyId, long userId) Returnstrueif the password policy has been assigned to the user.booleanhasRoleUser(long companyId, String name, long userId, boolean inherited) Returnstrueif the user has the role with the name, optionally through inheritance.booleanisPasswordExpired(com.liferay.portal.kernel.model.User user) Returnstrueif the user's password is expired.protected booleanisUseCustomSQL(LinkedHashMap<String, Object> params) protected booleanisUserAllowedToAuthenticate(com.liferay.portal.kernel.model.User user) com.liferay.portal.kernel.model.UserloadGetGuestUser(long companyId) Returns the guest user for the company.protected voidnotifyUser(com.liferay.portal.kernel.model.User user, com.liferay.portal.kernel.service.ServiceContext serviceContext) protected voidreindex(long userId) protected voidreindex(long[] userIds) protected voidreindex(com.liferay.portal.kernel.model.User user) protected voidprotected com.liferay.portal.kernel.model.UserresetFailedLoginAttempts(com.liferay.portal.kernel.model.User user) protected com.liferay.portal.kernel.model.UserresetFailedLoginAttempts(com.liferay.portal.kernel.model.User user, boolean forceUpdate) com.liferay.portal.kernel.search.Hitssearch(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.Hitssearch(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 keywords, int status, LinkedHashMap<String, Object> params, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> orderByComparator) Returns an ordered range of all the users who match the keywords and status, without using the indexer.com.liferay.portal.kernel.search.Hitssearch(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.Hitssearch(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) 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> orderByComparator) 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.List<com.liferay.portal.kernel.model.User>searchBySocial(long[] groupIds, long userId, int[] socialRelationTypes, String keywords, int start, int end) List<com.liferay.portal.kernel.model.User>searchBySocial(long userId, int[] socialRelationTypes, String keywords, int start, int end) List<com.liferay.portal.kernel.model.User>searchBySocial(long companyId, long[] groupIds, long[] userGroupIds, String keywords, int start, int end) List<com.liferay.portal.kernel.model.User>searchBySocial(long companyId, long[] groupIds, long[] userGroupIds, String keywords, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> orderByComparator) intsearchCount(long companyId, String keywords, int status, LinkedHashMap<String, Object> params) Returns the number of users who match the keywords and status.intsearchCount(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.searchCounts(long companyId, int status, long[] groupIds) 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) voidsendEmailAddressVerification(com.liferay.portal.kernel.model.User user, String emailAddress, com.liferay.portal.kernel.service.ServiceContext serviceContext) Sends an email address verification to the user.booleansendEmailUserCreationAttempt(long companyId, String emailAddress, String fromName, String fromAddress, String subject, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext) booleansendPassword(long companyId, String emailAddress, String fromName, String fromAddress, String subject, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext) booleansendPasswordByEmailAddress(long companyId, String emailAddress) Sends a password notification email to the user matching the email address.booleansendPasswordByScreenName(long companyId, String screenName) Sends a password notification email to the user matching the screen name.booleansendPasswordByUserId(long userId) Sends a password notification email to the user matching the ID.booleansendPasswordLockout(long companyId, String emailAddress, String fromName, String fromAddress, String subject, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext) protected voidsendPasswordNotification(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 voidsetEmailAddress(com.liferay.portal.kernel.model.User user, String password, String firstName, String middleName, String lastName, String emailAddress) voidsetRoleUsers(long roleId, long[] userIds) Sets the users in the role, removing and adding users to the role as necessary.voidsetUserGroupUsers(long userGroupId, long[] userIds) Sets the users in the user group, removing and adding users to the user group as necessary.protected voidtrackPassword(com.liferay.portal.kernel.model.User user) voidunsetGroupTeamsUsers(long groupId, long[] userIds) Removes the users from the teams of a group.voidunsetGroupUsers(long groupId, long[] userIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) Removes the users from the group.voidunsetOrganizationUsers(long organizationId, long[] userIds) Removes the users from the organization.voidunsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds) Removes the users from the password policy.voidunsetRoleUsers(long roleId, long[] userIds) Removes the users from the role.voidunsetRoleUsers(long roleId, List<com.liferay.portal.kernel.model.User> users) Removes the users from the role.voidunsetTeamUsers(long teamId, long[] userIds) Removes the users from the team.protected voidunsetUserGroups(long userId, long[] groupIds) voidunsetUserGroupUsers(long userGroupId, long[] userIds) Removes the users from the user group.protected voidunsetUserOrganizations(long userId, long[] organizationIds) com.liferay.portal.kernel.model.UserupdateAgreedToTermsOfUse(long userId, boolean agreedToTermsOfUse) Updates whether the user has agreed to the terms of use.voidupdateAsset(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.UserupdateCreateDate(long userId, Date createDate) Updates the user's creation date.com.liferay.portal.kernel.model.UserupdateEmailAddress(long userId, String password, String emailAddress1, String emailAddress2) Updates the user's email address.com.liferay.portal.kernel.model.UserupdateEmailAddress(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.UserupdateEmailAddressVerified(long userId, boolean emailAddressVerified) Updates whether the user has verified email address.com.liferay.portal.kernel.model.UserupdateExternalReferenceCode(long userId, String externalReferenceCode) com.liferay.portal.kernel.model.UserupdateExternalReferenceCode(com.liferay.portal.kernel.model.User user, String externalReferenceCode) com.liferay.portal.kernel.model.UserupdateFacebookId(long userId, long facebookId) Deprecated.As of Athanasius (7.3.x), with no direct replacementcom.liferay.portal.kernel.model.UserupdateGoogleUserId(long userId, String googleUserId) Updates the user's Google user ID.protected voidupdateGroups(long userId, long[] newGroupIds, boolean indexingEnabled) voidupdateGroups(long userId, long[] newGroupIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) Sets the groups the user is in, removing and adding groups as necessary.com.liferay.portal.kernel.model.UserupdateIncompleteUser(long creatorUserId, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, 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.UserupdateJobTitle(long userId, String jobTitle) Updates the user's job title.com.liferay.portal.kernel.model.UserupdateLanguageId(long userId, String languageId) com.liferay.portal.kernel.model.UserupdateLastLogin(long userId, String loginIP) Updates the user's last login with the current time and the IP address.com.liferay.portal.kernel.model.UserupdateLastLogin(com.liferay.portal.kernel.model.User user, String loginIP) com.liferay.portal.kernel.model.UserupdateLockout(com.liferay.portal.kernel.model.User user, boolean lockout) Updates whether the user is locked out from logging in.com.liferay.portal.kernel.model.UserupdateLockoutByEmailAddress(long companyId, String emailAddress, boolean lockout) Updates whether the user is locked out from logging in.com.liferay.portal.kernel.model.UserupdateLockoutById(long userId, boolean lockout) Updates whether the user is locked out from logging in.com.liferay.portal.kernel.model.UserupdateLockoutByScreenName(long companyId, String screenName, boolean lockout) Updates whether the user is locked out from logging in.com.liferay.portal.kernel.model.UserupdateModifiedDate(long userId, Date modifiedDate) Updates the user's modified date.com.liferay.portal.kernel.model.UserupdateOpenId(long userId, String openId) Deprecated.As of Athanasius (7.3.x), with no direct replacementprotected voidupdateOrganizations(long userId, long[] newOrganizationIds, boolean indexingEnabled) voidupdateOrganizations(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.UserupdatePassword(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.UserupdatePassword(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.UserupdatePasswordManually(long userId, String password, boolean passwordEncrypted, boolean passwordReset, Date passwordModifiedDate) Updates the user's password with manually input information.com.liferay.portal.kernel.model.UserupdatePasswordReset(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.UserupdatePortrait(long userId, byte[] bytes) Updates the user's portrait image.com.liferay.portal.kernel.model.UserupdateReminderQuery(long userId, String question, String answer) Updates the user's password reset question and answer.com.liferay.portal.kernel.model.UserupdateScreenName(long userId, String screenName) Updates the user's screen name.com.liferay.portal.kernel.model.UserupdateStatus(long userId, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext) Updates the user's workflow status.com.liferay.portal.kernel.model.UserupdateStatus(com.liferay.portal.kernel.model.User user, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext) com.liferay.portal.kernel.model.UserupdateUser(long userId, String oldPassword, String newPassword1, String newPassword2, boolean passwordReset, String reminderQueryQuestion, String reminderQueryAnswer, String screenName, String emailAddress, boolean hasPortrait, byte[] portraitBytes, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, 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.protected voidupdateUserGroupRoles(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 voidvalidate(long companyId, long userId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long ldapServerId, String openId, String firstName, String middleName, String lastName, long[] organizationIds, Locale locale) protected voidvalidate(long userId, String screenName, String emailAddress, String openId, String firstName, String middleName, String lastName, String smsSn, Locale locale) protected voidvalidateEmailAddress(long companyId, String emailAddress) protected voidvalidateEmailAddress(com.liferay.portal.kernel.model.User user, String emailAddress1, String emailAddress2) protected voidvalidateFullName(long companyId, String firstName, String middleName, String lastName, Locale locale) protected voidvalidateGoogleUserId(long companyId, long userId, String googleUserId) voidvalidateMaxUsers(long companyId) protected voidvalidateOpenId(long companyId, long userId, String openId) protected voidvalidatePassword(long userId, String password1, String password2) protected voidvalidateReminderQuery(long companyId, String question, String answer) protected voidvalidateScreenName(long companyId, long userId, String screenName) voidverifyEmailAddress(String ticketKey) Verifies the email address of the ticket.Methods inherited from class com.liferay.portal.service.base.UserLocalServiceBaseImpl
addUser, clearGroupUsers, clearOrganizationUsers, clearRoleUsers, clearTeamUsers, clearUserGroupUsers, createPersistedModel, createUser, deleteGroupUser, deleteGroupUser, deleteGroupUsers, deleteGroupUsers, deleteOrganizationUser, deleteOrganizationUser, deleteOrganizationUsers, deleteOrganizationUsers, deletePersistedModel, deleteRoleUser, deleteRoleUsers, deleteRoleUsers, deleteTeamUser, deleteTeamUser, deleteTeamUsers, deleteTeamUsers, deleteUserGroupUser, deleteUserGroupUsers, deleteUserGroupUsers, dslQuery, dslQueryCount, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQueryCount, dynamicQueryCount, fetchUser, fetchUserByExternalReferenceCode, fetchUserByUuidAndCompanyId, getActionableDynamicQuery, getBasePersistence, getCounterLocalService, getCTPersistence, getExportActionableDynamicQuery, getGroupPrimaryKeys, getGroupUsers, getGroupUsers, getGroupUsers, getGroupUsersCount, getIndexableActionableDynamicQuery, getModelClass, getModelClassName, getOrganizationPrimaryKeys, getOrganizationUsers, getOrganizationUsers, getOrganizationUsers, getOrganizationUsersCount, getOSGiServiceIdentifier, getPersistedModel, getRolePrimaryKeys, getRoleUsers, getRoleUsers, getRoleUsers, getRoleUsersCount, getTeamPrimaryKeys, getTeamUsers, getTeamUsers, getTeamUsers, getTeamUsersCount, getUser, getUserByExternalReferenceCode, getUserByUuidAndCompanyId, getUserFinder, getUserGroupPrimaryKeys, getUserGroupUsers, getUserGroupUsers, getUserGroupUsers, getUserGroupUsersCount, getUserLocalService, getUserPersistence, getUsers, getUsersCount, hasGroupUser, hasGroupUsers, hasOrganizationUser, hasOrganizationUsers, hasRoleUser, hasRoleUsers, hasTeamUser, hasTeamUsers, hasUserGroupUser, hasUserGroupUsers, initActionableDynamicQuery, runSQL, setCounterLocalService, setGroupUsers, setOrganizationUsers, setTeamUsers, setUserFinder, setUserLocalService, setUserPersistence, updateUser, updateWithUnsafeFunctionMethods inherited from class com.liferay.portal.kernel.service.BaseLocalServiceImpl
getClassLoader, getLocalizationMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel
-
Field Details
-
mailService
@BeanReference(type=com.liferay.mail.kernel.service.MailService.class) protected com.liferay.mail.kernel.service.MailService mailService
-
-
Constructor Details
-
UserLocalServiceImpl
public UserLocalServiceImpl()
-
-
Method Details
-
addDefaultAdminUser
public com.liferay.portal.kernel.model.User addDefaultAdminUser(long companyId, String password, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName) throws com.liferay.portal.kernel.exception.PortalException Adds a default admin user for the company.- Parameters:
companyId- the primary key of the user's companypassword- the password of the userscreenName- 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 name- Returns:
- the new default admin user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addDefaultGroups
public boolean addDefaultGroups(long userId) throws com.liferay.portal.kernel.exception.PortalException Adds the user to the default groups, unless the user is already in these groups. The default groups can be specified inportal.propertieswith the keyadmin.default.group.names.- Parameters:
userId- the primary key of the user- Returns:
trueif user was added to default groups;falseif user was already a member- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addDefaultRoles
public boolean addDefaultRoles(long userId) throws com.liferay.portal.kernel.exception.PortalException Adds the user to the default regular roles, unless the user already has these regular roles. The default regular roles can be specified inportal.propertieswith the keyadmin.default.role.names.- Parameters:
userId- the primary key of the user- Returns:
trueif user was given default roles;falseif user already has default roles- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addDefaultServiceAccountUser
public com.liferay.portal.kernel.model.User addDefaultServiceAccountUser(long companyId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
addDefaultUserGroups
public boolean addDefaultUserGroups(long userId) throws com.liferay.portal.kernel.exception.PortalException Adds the user to the default user groups, unless the user is already in these user groups. The default user groups can be specified inportal.propertieswith the propertyadmin.default.user.group.names.- Parameters:
userId- the primary key of the user- Returns:
trueif user was added to default user groups;falseif user is already a user group member- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addGroupUser
public boolean addGroupUser(long groupId, long userId) Adds the user to the group.- Specified by:
addGroupUserin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addGroupUserin classUserLocalServiceBaseImpl- Parameters:
groupId- the primary key of the groupuserId- the primary key of the user- Returns:
trueif the association between the ${groupId} and ${userId} is added;falseif it was already added
-
addGroupUser
public boolean addGroupUser(long groupId, com.liferay.portal.kernel.model.User user) Adds the user to the group.- Specified by:
addGroupUserin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addGroupUserin classUserLocalServiceBaseImpl- Parameters:
groupId- the primary key of the groupuser- the user- Returns:
trueif the association between the ${groupId} and ${user} is added;falseif it was already added
-
addGroupUsers
public boolean addGroupUsers(long groupId, List<com.liferay.portal.kernel.model.User> users) throws com.liferay.portal.kernel.exception.PortalException Adds the users to the group.- Specified by:
addGroupUsersin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addGroupUsersin classUserLocalServiceBaseImpl- Parameters:
groupId- the primary key of the groupusers- the users- Returns:
trueif at least an association between the ${groupId} and the ${users} is added;falseif all were already added- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addGroupUsers
public boolean addGroupUsers(long groupId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException Adds the users to the group.- Specified by:
addGroupUsersin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addGroupUsersin classUserLocalServiceBaseImpl- Parameters:
groupId- the primary key of the groupuserIds- the primary keys of the users- Returns:
trueif at least an association between the ${groupId} and the ${userIds} is added;falseif all were already added- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addOrganizationUser
public boolean addOrganizationUser(long organizationId, long userId) Adds the user to the organization.- Specified by:
addOrganizationUserin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addOrganizationUserin classUserLocalServiceBaseImpl- Parameters:
organizationId- the primary key of the organizationuserId- the primary key of the user- Returns:
trueif the association between the ${organizationId} and ${userId} is added;falseif it was already added
-
addOrganizationUser
public boolean addOrganizationUser(long organizationId, com.liferay.portal.kernel.model.User user) Adds the user to the organization.- Specified by:
addOrganizationUserin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addOrganizationUserin classUserLocalServiceBaseImpl- Parameters:
organizationId- the primary key of the organizationuser- the user- Returns:
trueif the association between the ${organizationId} and ${user} is added;falseif it was already added
-
addOrganizationUsers
public boolean addOrganizationUsers(long organizationId, List<com.liferay.portal.kernel.model.User> users) throws com.liferay.portal.kernel.exception.PortalException Adds the users to the organization.- Specified by:
addOrganizationUsersin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addOrganizationUsersin classUserLocalServiceBaseImpl- Parameters:
organizationId- the primary key of the organizationusers- the users- Returns:
trueif at least an association between the ${organizationId} and the ${users} is added;falseif all were already added- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addOrganizationUsers
public boolean addOrganizationUsers(long organizationId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException Adds the users to the organization.- Specified by:
addOrganizationUsersin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addOrganizationUsersin classUserLocalServiceBaseImpl- Parameters:
organizationId- the primary key of the organizationuserIds- the primary keys of the users- Returns:
trueif at least an association between the ${organizationId} and the ${userIds} is added;falseif all were already added- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addOrUpdateUser
public com.liferay.portal.kernel.model.User addOrUpdateUser(String externalReferenceCode, long creatorUserId, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, boolean sendEmail, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
addPasswordPolicyUsers
public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds) Assigns the password policy to the users, removing any other currently assigned password policies.- Parameters:
passwordPolicyId- the primary key of the password policyuserIds- the primary keys of the users
-
addRoleUser
public boolean addRoleUser(long roleId, long userId) Adds the user to the role.- Specified by:
addRoleUserin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addRoleUserin classUserLocalServiceBaseImpl- Parameters:
roleId- the primary key of the roleuserId- the primary key of the user- Returns:
trueif the association between the ${roleId} and ${userId} is added;falseif it was already added
-
addRoleUser
public boolean addRoleUser(long roleId, com.liferay.portal.kernel.model.User user) Adds the user to the role.- Specified by:
addRoleUserin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addRoleUserin classUserLocalServiceBaseImpl- Parameters:
roleId- the primary key of the roleuser- the user- Returns:
trueif the association between the ${roleId} and ${user} is added;falseif it was already added
-
addRoleUsers
public boolean addRoleUsers(long roleId, List<com.liferay.portal.kernel.model.User> users) throws com.liferay.portal.kernel.exception.PortalException Adds the users to the role.- Specified by:
addRoleUsersin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addRoleUsersin classUserLocalServiceBaseImpl- Parameters:
roleId- the primary key of the roleusers- the users- Returns:
trueif at least an association between the ${roleId} and the ${users} is added;falseif all were already added- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addRoleUsers
public boolean addRoleUsers(long roleId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException Adds the users to the role.- Specified by:
addRoleUsersin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addRoleUsersin classUserLocalServiceBaseImpl- Parameters:
roleId- the primary key of the roleuserIds- the primary keys of the users- Returns:
trueif at least an association between the ${roleId} and the ${userIds} is added;falseif all were already added- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addTeamUser
public boolean addTeamUser(long teamId, long userId) Adds the user to the team.- Specified by:
addTeamUserin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addTeamUserin classUserLocalServiceBaseImpl- Parameters:
teamId- the primary key of the teamuserId- the primary key of the user- Returns:
trueif the association between the ${teamId} and ${userId} is added;falseif it was already added
-
addTeamUser
public boolean addTeamUser(long teamId, com.liferay.portal.kernel.model.User user) Adds the user to the team.- Specified by:
addTeamUserin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addTeamUserin classUserLocalServiceBaseImpl- Parameters:
teamId- the primary key of the teamuser- the user- Returns:
trueif the association between the ${teamId} and ${user} is added;falseif it was already added
-
addTeamUsers
public boolean addTeamUsers(long teamId, List<com.liferay.portal.kernel.model.User> users) throws com.liferay.portal.kernel.exception.PortalException Adds the users to the team.- Specified by:
addTeamUsersin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addTeamUsersin classUserLocalServiceBaseImpl- Parameters:
teamId- the primary key of the teamusers- the users- Returns:
trueif at least an association between the ${teamId} and the ${users} is added;falseif all were already added- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addTeamUsers
public boolean addTeamUsers(long teamId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException Adds the users to the team.- Specified by:
addTeamUsersin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addTeamUsersin classUserLocalServiceBaseImpl- Parameters:
teamId- the primary key of the teamuserIds- the primary keys of the users- Returns:
trueif at least an association between the ${teamId} and the ${userIds} is added;falseif all were already added- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addUser
public com.liferay.portal.kernel.model.User addUser(long creatorUserId, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, int type, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException Adds a user.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.
- Parameters:
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 addresslocale- the user's localefirstName- the user's first namemiddleName- the user's middle namelastName- the user's last nameprefixListTypeId- the user's name prefix IDsuffixListTypeId- 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 titletype- the user's typegroupIds- 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 (optionallynull). Can set the UUID (with theuuidattribute), asset category IDs, asset tag names, and expando bridge attributes for the user.- Returns:
- the new user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addUserGroupUser
public boolean addUserGroupUser(long userGroupId, long userId) Adds the user to the user group.- Specified by:
addUserGroupUserin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addUserGroupUserin classUserLocalServiceBaseImpl- Parameters:
userGroupId- the primary key of the user groupuserId- the primary key of the user- Returns:
trueif the association between the ${userGroupId} and ${userId} is added;falseif it was already added
-
addUserGroupUser
public boolean addUserGroupUser(long userGroupId, com.liferay.portal.kernel.model.User user) Adds the user to the user group.- Specified by:
addUserGroupUserin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addUserGroupUserin classUserLocalServiceBaseImpl- Parameters:
userGroupId- the primary key of the user groupuser- the user- Returns:
trueif the association between the ${userGroupId} and ${user} is added;falseif it was already added
-
addUserGroupUsers
public boolean addUserGroupUsers(long userGroupId, List<com.liferay.portal.kernel.model.User> users) throws com.liferay.portal.kernel.exception.PortalException Adds the users to the user group.- Specified by:
addUserGroupUsersin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addUserGroupUsersin classUserLocalServiceBaseImpl- Parameters:
userGroupId- the primary key of the user groupusers- the users- Returns:
trueif at least an association between the ${userGroupId} and the ${users} is added;falseif all were already added- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addUserGroupUsers
public boolean addUserGroupUsers(long userGroupId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException Adds the users to the user group.- Specified by:
addUserGroupUsersin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
addUserGroupUsersin classUserLocalServiceBaseImpl- Parameters:
userGroupId- the primary key of the user groupuserIds- the primary keys of the users- Returns:
trueif at least an association between the ${userGroupId} and the ${userIds} is added;falseif all were already added- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addUserWithWorkflow
public com.liferay.portal.kernel.model.User addUserWithWorkflow(long creatorUserId, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, int type, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException Adds a user with workflow.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.
- Parameters:
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 addresslocale- the user's localefirstName- the user's first namemiddleName- the user's middle namelastName- the user's last nameprefixListTypeId- the user's name prefix IDsuffixListTypeId- 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 titletype- the user's typegroupIds- 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 (optionallynull). Can set the UUID (with theuuidattribute), asset category IDs, asset tag names, and expando bridge attributes for the user.- Returns:
- the new user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
afterPropertiesSet
public void afterPropertiesSet()- Overrides:
afterPropertiesSetin classUserLocalServiceBaseImpl
-
authenticateByEmailAddress
@Transactional(propagation=REQUIRED) public int authenticateByEmailAddress(long companyId, String emailAddress, String password, Map<String, String[]> headerMap, Map<String, throws com.liferay.portal.kernel.exception.PortalExceptionString[]> parameterMap, Map<String, Object> resultsMap) Attempts to authenticate the user by their email address and password, while using the AuthPipeline.- Parameters:
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 keyuserId.- Returns:
- the authentication status. This can be
Authenticator.FAILUREindicating that the user's credentials are invalid,Authenticator.SUCCESSindicating a successful login, orAuthenticator.DNEindicating that a user with that login does not exist. - Throws:
com.liferay.portal.kernel.exception.PortalException- See Also:
-
authenticateByScreenName
@Transactional(propagation=REQUIRED) public int authenticateByScreenName(long companyId, String screenName, String password, Map<String, String[]> headerMap, Map<String, throws com.liferay.portal.kernel.exception.PortalExceptionString[]> parameterMap, Map<String, Object> resultsMap) Attempts to authenticate the user by their screen name and password, while using the AuthPipeline.- Parameters:
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 keyuserId.- Returns:
- the authentication status. This can be
Authenticator.FAILUREindicating that the user's credentials are invalid,Authenticator.SUCCESSindicating a successful login, orAuthenticator.DNEindicating that a user with that login does not exist. - Throws:
com.liferay.portal.kernel.exception.PortalException- See Also:
-
authenticateByUserId
@Transactional(propagation=REQUIRED) public int authenticateByUserId(long companyId, long userId, String password, Map<String, String[]> headerMap, Map<String, throws com.liferay.portal.kernel.exception.PortalExceptionString[]> parameterMap, Map<String, Object> resultsMap) Attempts to authenticate the user by their primary key and password, while using the AuthPipeline.- Parameters:
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 keyuserId.- Returns:
- the authentication status. This can be
Authenticator.FAILUREindicating that the user's credentials are invalid,Authenticator.SUCCESSindicating a successful login, orAuthenticator.DNEindicating that a user with that login does not exist. - Throws:
com.liferay.portal.kernel.exception.PortalException- See Also:
-
authenticateForBasic
@Transactional(propagation=SUPPORTS) public long authenticateForBasic(long companyId, String authType, String login, String password) throws com.liferay.portal.kernel.exception.PortalException Attempts to authenticate the user using HTTP basic access authentication, without using the AuthPipeline. Primarily used for authenticating users oftunnel-web.Authentication type specifies what
logincontains.The valid values are:-
CompanyConstants.AUTH_TYPE_EA-loginis the user's email address -
CompanyConstants.AUTH_TYPE_SN-loginis the user's screen name -
CompanyConstants.AUTH_TYPE_ID-loginis the user's primary key
- Parameters:
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 ofauthTypepassword- the user's password- Returns:
- the user's primary key if authentication is successful;
0otherwise - Throws:
com.liferay.portal.kernel.exception.PortalException
-
-
authenticateForDigest
@Deprecated @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 Deprecated.As of Cavanaugh (7.4.x), with no direct replacementAttempts to authenticate the user using HTTP digest access authentication, without using the AuthPipeline. Primarily used for authenticating users oftunnel-web.- Parameters:
companyId- the primary key of the user's companyrealm- unusednonce- the number used oncemethod- the request methoduri- the request URIresponse- the authentication response hash- Returns:
- the user's primary key if authentication is successful;
0otherwise - Throws:
com.liferay.portal.kernel.exception.PortalException
-
checkLockout
public void checkLockout(com.liferay.portal.kernel.model.User user) throws com.liferay.portal.kernel.exception.PortalException 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.- Parameters:
user- the user- Throws:
com.liferay.portal.kernel.exception.PortalException
-
checkLoginFailure
public 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.- Parameters:
user- the user
-
checkLoginFailureByEmailAddress
public void checkLoginFailureByEmailAddress(long companyId, String emailAddress) throws com.liferay.portal.kernel.exception.PortalException Adds a failed login attempt to the user with the email address and updates the user's last failed login date.- Parameters:
companyId- the primary key of the user's companyemailAddress- the user's email address- Throws:
com.liferay.portal.kernel.exception.PortalException
-
checkLoginFailureById
public void checkLoginFailureById(long userId) throws com.liferay.portal.kernel.exception.PortalException Adds a failed login attempt to the user and updates the user's last failed login date.- Parameters:
userId- the primary key of the user- Throws:
com.liferay.portal.kernel.exception.PortalException
-
checkLoginFailureByScreenName
public void checkLoginFailureByScreenName(long companyId, String screenName) throws com.liferay.portal.kernel.exception.PortalException Adds a failed login attempt to the user with the screen name and updates the user's last failed login date.- Parameters:
companyId- the primary key of the user's companyscreenName- the user's screen name- Throws:
com.liferay.portal.kernel.exception.PortalException
-
checkPasswordExpired
public void checkPasswordExpired(com.liferay.portal.kernel.model.User user) throws com.liferay.portal.kernel.exception.PortalException 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.- Parameters:
user- the user- Throws:
com.liferay.portal.kernel.exception.PortalException
-
completeUserRegistration
public void completeUserRegistration(com.liferay.portal.kernel.model.User user, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException Completes the user's registration by generating a password and sending the confirmation email.- Parameters:
user- the userserviceContext- the service context to be applied. You automatically generate a password for the user by setting attributeautoPasswordtotrue. You can send a confirmation email to the user by setting attributesendEmailtotrue.- Throws:
com.liferay.portal.kernel.exception.PortalException
-
deletePortrait
public void deletePortrait(long userId) throws com.liferay.portal.kernel.exception.PortalException Deletes the user's portrait image.- Parameters:
userId- the primary key of the user- Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteRoleUser
public void deleteRoleUser(long roleId, long userId) throws com.liferay.portal.kernel.exception.PortalException Removes the user from the role.- Specified by:
deleteRoleUserin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
deleteRoleUserin classUserLocalServiceBaseImpl- Parameters:
roleId- the primary key of the roleuserId- the primary key of the user- Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteUser
public com.liferay.portal.kernel.model.User deleteUser(long userId) throws com.liferay.portal.kernel.exception.PortalException Deletes the user.- Specified by:
deleteUserin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
deleteUserin classUserLocalServiceBaseImpl- Parameters:
userId- the primary key of the user- Returns:
- the deleted user
- Throws:
com.liferay.portal.kernel.exception.PortalException- if a user with the primary key could not be found
-
deleteUser
public com.liferay.portal.kernel.model.User deleteUser(com.liferay.portal.kernel.model.User user) throws com.liferay.portal.kernel.exception.PortalException Deletes the user.- Specified by:
deleteUserin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
deleteUserin classUserLocalServiceBaseImpl- Parameters:
user- the user- Returns:
- the deleted user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
deleteUserGroupUser
public void deleteUserGroupUser(long userGroupId, long userId) throws com.liferay.portal.kernel.exception.PortalException Removes the user from the user group.- Specified by:
deleteUserGroupUserin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
deleteUserGroupUserin classUserLocalServiceBaseImpl- Parameters:
userGroupId- the primary key of the user groupuserId- the primary key of the user- Throws:
com.liferay.portal.kernel.exception.PortalException
-
destroy
public void destroy()- Overrides:
destroyin classUserLocalServiceBaseImpl
-
encryptUserId
@Transactional(propagation=SUPPORTS, readOnly=true) public String encryptUserId(String name) throws com.liferay.portal.kernel.exception.PortalException Encrypts the primary key of the user. Used when encrypting the user's credentials for storage in an automatic login cookie.- Parameters:
name- the primary key of the user- Returns:
- the user's encrypted primary key
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
fetchGuestUser
public com.liferay.portal.kernel.model.User fetchGuestUser(long companyId) Returns the guest user for the company.- Parameters:
companyId- the primary key of the company- Returns:
- the guest user for the company, or
nullif a user with the company key could not be found
-
fetchUserByContactId
public com.liferay.portal.kernel.model.User fetchUserByContactId(long contactId) Returns the user with the contact ID.- Parameters:
contactId- the user's contact ID- Returns:
- the user with the contact ID, or
nullif a user with the contact ID could not be found
-
fetchUserByEmailAddress
public com.liferay.portal.kernel.model.User fetchUserByEmailAddress(long companyId, String emailAddress) Returns the user with the email address.- Parameters:
companyId- the primary key of the user's companyemailAddress- the user's email address- Returns:
- the user with the email address, or
nullif a user with the email address could not be found
-
fetchUserByFacebookId
@Deprecated public com.liferay.portal.kernel.model.User fetchUserByFacebookId(long companyId, long facebookId) Deprecated.As of Athanasius (7.3.x), with no direct replacementReturns the user with the Facebook ID.- Parameters:
companyId- the primary key of the user's companyfacebookId- the user's Facebook ID- Returns:
- the user with the Facebook ID, or
nullif a user with the Facebook ID could not be found
-
fetchUserByGoogleUserId
public com.liferay.portal.kernel.model.User fetchUserByGoogleUserId(long companyId, String googleUserId) Returns the user with the Google user ID.- Parameters:
companyId- the primary key of the user's companygoogleUserId- the user's Google user ID- Returns:
- the user with the Google user ID, or
nullif a user with the Google user ID could not be found
-
fetchUserById
public com.liferay.portal.kernel.model.User fetchUserById(long userId) Returns the user with the primary key.- Parameters:
userId- the primary key of the user- Returns:
- the user with the primary key, or
nullif a user with the primary key could not be found
-
fetchUserByOpenId
@Deprecated public com.liferay.portal.kernel.model.User fetchUserByOpenId(long companyId, String openId) Deprecated.As of Athanasius (7.3.x), with no direct replacementReturns the user with the OpenID.- Parameters:
companyId- the primary key of the user's companyopenId- the user's OpenID- Returns:
- the user with the OpenID, or
nullif a user with the OpenID could not be found
-
fetchUserByPortraitId
public com.liferay.portal.kernel.model.User fetchUserByPortraitId(long portraitId) Returns the user with the portrait ID.- Parameters:
portraitId- the user's portrait ID- Returns:
- the user with the portrait ID, or
nullif a user with the portrait ID could not be found
-
fetchUserByScreenName
public com.liferay.portal.kernel.model.User fetchUserByScreenName(long companyId, String screenName) Returns the user with the screen name.- Parameters:
companyId- the primary key of the user's companyscreenName- the user's screen name- Returns:
- the user with the screen name, or
nullif a user with the screen name could not be found
-
getCompanyUsers
public 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.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil.ALL_POSwill return the full result set.- Parameters:
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)- Returns:
- the range of users belonging to the company
-
getCompanyUsersCount
public int getCompanyUsersCount(long companyId) Returns the number of users belonging to the company.- Parameters:
companyId- the primary key of the company- Returns:
- the number of users belonging to the company
-
getDefaultUser
@Deprecated public com.liferay.portal.kernel.model.User getDefaultUser(long companyId) throws com.liferay.portal.kernel.exception.PortalException Deprecated.As of Cavanaugh (7.4.x), replaced bygetGuestUser(long)- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getDefaultUserId
@Deprecated public long getDefaultUserId(long companyId) throws com.liferay.portal.kernel.exception.PortalException Deprecated.As of Cavanaugh (7.4.x), replaced bygetGuestUserId(long)- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getGroupUserIds
public long[] getGroupUserIds(long groupId) Returns the primary keys of all the users belonging to the group.- Parameters:
groupId- the primary key of the group- Returns:
- the primary keys of the users belonging to the group
-
getGroupUsers
public 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> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException Returns the users belonging to a group.- Parameters:
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)orderByComparator- the comparator to order the users by (optionallynull)- Returns:
- the matching users
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getGroupUsers
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> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException Returns the users belonging to a group.- Parameters:
groupId- the primary key of the groupstatus- the workflow statusorderByComparator- the comparator to order the users by (optionallynull)- Returns:
- the matching users
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getGroupUsersCount
public int getGroupUsersCount(long groupId, int status) throws com.liferay.portal.kernel.exception.PortalException Returns the number of users with the status belonging to the group.- Parameters:
groupId- the primary key of the groupstatus- the workflow status- Returns:
- the number of users with the status belonging to the group
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getGuestUser
@Transactional(enabled=false) public com.liferay.portal.kernel.model.User getGuestUser(long companyId) throws com.liferay.portal.kernel.exception.PortalException Returns the guest user for the company.- Parameters:
companyId- the primary key of the company- Returns:
- the guest user for the company
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getGuestUserId
@Transactional(enabled=false) public long getGuestUserId(long companyId) throws com.liferay.portal.kernel.exception.PortalException Returns the primary key of the guest user for the company.- Parameters:
companyId- the primary key of the company- Returns:
- the primary key of the guest user for the company
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getInheritedRoleUsers
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> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getNoAnnouncementsDeliveries
Returns all the users who have not had any announcements of the type delivered, excluding the default user.- Parameters:
type- the type of announcement- Returns:
- the users who have not had any annoucements of the type delivered
-
getNoGroups
Returns all the users who do not belong to any groups, excluding the default user.- Returns:
- the users who do not belong to any groups
-
getOrganizationsAndUserGroupsUsersCount
public int getOrganizationsAndUserGroupsUsersCount(long[] organizationIds, long[] userGroupIds) -
getOrganizationUserIds
public long[] getOrganizationUserIds(long organizationId) Returns the primary keys of all the users belonging to the organization.- Parameters:
organizationId- the primary key of the organization- Returns:
- the primary keys of the users belonging to the organization
-
getOrganizationUsers
public 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> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException Returns the users belonging to the organization with the status.- Parameters:
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)orderByComparator- the comparator to order the users by (optionallynull)- Returns:
- the matching users
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getOrganizationUsers
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> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException Returns the users belonging to the organization with the status.- Parameters:
organizationId- the primary key of the organizationstatus- the workflow statusorderByComparator- the comparator to order the users by (optionallynull)- Returns:
- the matching users
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getOrganizationUsersCount
public int getOrganizationUsersCount(long organizationId, int status) throws com.liferay.portal.kernel.exception.PortalException Returns the number of users with the status belonging to the organization.- Parameters:
organizationId- the primary key of the organizationstatus- the workflow status- Returns:
- the number of users with the status belonging to the organization
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getRoleUserIds
public long[] getRoleUserIds(long roleId) Returns the primary keys of all the users belonging to the role.- Parameters:
roleId- the primary key of the role- Returns:
- the primary keys of the users belonging to the role
-
getRoleUserIds
public long[] getRoleUserIds(long roleId, long type) -
getRoleUsersCount
public int getRoleUsersCount(long roleId, int status) throws com.liferay.portal.kernel.exception.PortalException Returns the number of users with the status belonging to the role.- Parameters:
roleId- the primary key of the rolestatus- the workflow status- Returns:
- the number of users with the status belonging to the role
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getSocialUsers
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> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getSocialUsers
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> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException Returns an ordered range of all the users with a mutual social relation of the type with both of the given users.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil.ALL_POSwill return the full result set.- Parameters:
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 inSocialRelationConstants.start- the lower bound of the range of usersend- the upper bound of the range of users (not inclusive)orderByComparator- the comparator to order the users by (optionallynull)- Returns:
- the ordered range of users with a mutual social relation of the type with the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getSocialUsers
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> orderByComparator) throws com.liferay.portal.kernel.exception.PortalException Returns an ordered range of all the users with a mutual social relation with both of the given users.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil.ALL_POSwill return the full result set.- Parameters:
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)orderByComparator- the comparator to order the users by (optionallynull)- Returns:
- the ordered range of users with a mutual social relation with the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getSocialUsersCount
public int getSocialUsersCount(long userId, int socialRelationType, String socialRelationTypeComparator) throws com.liferay.portal.kernel.exception.PortalException Returns the number of users with a social relation with the user.- Parameters:
userId- the primary key of the usersocialRelationType- the type of social relation. The possible types can be found inSocialRelationConstants.- Returns:
- the number of users with a social relation with the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getSocialUsersCount
public int getSocialUsersCount(long userId1, long userId2) throws com.liferay.portal.kernel.exception.PortalException Returns the number of users with a mutual social relation with both of the given users.- Parameters:
userId1- the primary key of the first useruserId2- the primary key of the second user- Returns:
- the number of users with a mutual social relation with the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getSocialUsersCount
public int getSocialUsersCount(long userId1, long userId2, int socialRelationType) throws com.liferay.portal.kernel.exception.PortalException Returns the number of users with a mutual social relation of the type with both of the given users.- Parameters:
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 inSocialRelationConstants.- Returns:
- the number of users with a mutual social relation of the type with the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getUserByContactId
public com.liferay.portal.kernel.model.User getUserByContactId(long contactId) throws com.liferay.portal.kernel.exception.PortalException Returns the user with the contact ID.- Parameters:
contactId- the user's contact ID- Returns:
- the user with the contact ID
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getUserByEmailAddress
public com.liferay.portal.kernel.model.User getUserByEmailAddress(long companyId, String emailAddress) throws com.liferay.portal.kernel.exception.PortalException Returns the user with the email address.- Parameters:
companyId- the primary key of the user's companyemailAddress- the user's email address- Returns:
- the user with the email address
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getUserByFacebookId
@Deprecated public com.liferay.portal.kernel.model.User getUserByFacebookId(long companyId, long facebookId) throws com.liferay.portal.kernel.exception.PortalException Deprecated.As of Athanasius (7.3.x), with no direct replacementReturns the user with the Facebook ID.- Parameters:
companyId- the primary key of the user's companyfacebookId- the user's Facebook ID- Returns:
- the user with the Facebook ID
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getUserByGoogleUserId
public com.liferay.portal.kernel.model.User getUserByGoogleUserId(long companyId, String googleUserId) throws com.liferay.portal.kernel.exception.PortalException Returns the user with the Google user ID.- Parameters:
companyId- the primary key of the user's companygoogleUserId- the user's Google user ID- Returns:
- the user with the Google user ID
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getUserById
public com.liferay.portal.kernel.model.User getUserById(long userId) throws com.liferay.portal.kernel.exception.PortalException Returns the user with the primary key.- Parameters:
userId- the primary key of the user- Returns:
- the user with the primary key
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getUserById
public com.liferay.portal.kernel.model.User getUserById(long companyId, long userId) throws com.liferay.portal.kernel.exception.PortalException Returns the user with the primary key from the company.- Parameters:
companyId- the primary key of the user's companyuserId- the primary key of the user- Returns:
- the user with the primary key
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getUserByOpenId
@Deprecated public com.liferay.portal.kernel.model.User getUserByOpenId(long companyId, String openId) throws com.liferay.portal.kernel.exception.PortalException Deprecated.As of Athanasius (7.3.x), with no direct replacementReturns the user with the OpenID.- Parameters:
companyId- the primary key of the user's companyopenId- the user's OpenID- Returns:
- the user with the OpenID
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getUserByPortraitId
public com.liferay.portal.kernel.model.User getUserByPortraitId(long portraitId) throws com.liferay.portal.kernel.exception.PortalException Returns the user with the portrait ID.- Parameters:
portraitId- the user's portrait ID- Returns:
- the user with the portrait ID
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getUserByScreenName
public com.liferay.portal.kernel.model.User getUserByScreenName(long companyId, String screenName) throws com.liferay.portal.kernel.exception.PortalException Returns the user with the screen name.- Parameters:
companyId- the primary key of the user's companyscreenName- the user's screen name- Returns:
- the user with the screen name
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getUserGroupUsersCount
public int getUserGroupUsersCount(long userGroupId, int status) throws com.liferay.portal.kernel.exception.PortalException Returns the number of users with the status belonging to the user group.- Parameters:
userGroupId- the primary key of the user groupstatus- the workflow status- Returns:
- the number of users with the status belonging to the user group
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getUserIdByEmailAddress
public long getUserIdByEmailAddress(long companyId, String emailAddress) throws com.liferay.portal.kernel.exception.PortalException Returns the primary key of the user with the email address.- Parameters:
companyId- the primary key of the user's companyemailAddress- the user's email address- Returns:
- the primary key of the user with the email address
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getUserIdByScreenName
public long getUserIdByScreenName(long companyId, String screenName) throws com.liferay.portal.kernel.exception.PortalException Returns the primary key of the user with the screen name.- Parameters:
companyId- the primary key of the user's companyscreenName- the user's screen name- Returns:
- the primary key of the user with the screen name
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
getUsers
public List<com.liferay.portal.kernel.model.User> getUsers(long companyId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> orderByComparator) -
getUsersByRoleId
public List<com.liferay.portal.kernel.model.User> getUsersByRoleId(long roleId, int start, int end) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getUsersByRoleName
public List<com.liferay.portal.kernel.model.User> getUsersByRoleName(long companyId, String roleName, int start, int end) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getUsersCount
public int getUsersCount(long companyId, int status) -
hasPasswordPolicyUser
public boolean hasPasswordPolicyUser(long passwordPolicyId, long userId) Returnstrueif the password policy has been assigned to the user.- Parameters:
passwordPolicyId- the primary key of the password policyuserId- the primary key of the user- Returns:
trueif the password policy is assigned to the user;falseotherwise
-
hasRoleUser
public boolean hasRoleUser(long companyId, String name, long userId, boolean inherited) throws com.liferay.portal.kernel.exception.PortalException Returnstrueif the user has the role with the name, optionally through inheritance.- Parameters:
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.- Returns:
trueif the user has the role;falseotherwise- Throws:
com.liferay.portal.kernel.exception.PortalException
-
isPasswordExpired
public boolean isPasswordExpired(com.liferay.portal.kernel.model.User user) throws com.liferay.portal.kernel.exception.PortalException Returnstrueif the user's password is expired.- Parameters:
user- the user- Returns:
trueif the user's password is expired;falseotherwise- Throws:
com.liferay.portal.kernel.exception.PortalException
-
loadGetGuestUser
public com.liferay.portal.kernel.model.User loadGetGuestUser(long companyId) throws com.liferay.portal.kernel.exception.PortalException Returns the guest user for the company.- Parameters:
companyId- the primary key of the company- Returns:
- the guest user for the company
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
search
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> orderByComparator) Returns an ordered range of all the users who match the keywords and status, without using the indexer. It is preferable to use the indexed versionsearch(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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil.ALL_POSwill return the full result set.- Parameters:
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 (optionallynull). For more information seeUserFinder.start- the lower bound of the range of usersend- the upper bound of the range of users (not inclusive)orderByComparator- the comparator to order the users by (optionallynull)- Returns:
- the matching users
- See Also:
-
UserFinder
-
search
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) Returns an ordered range of all the users who match the keywords and status, using the indexer. It is preferable to use this method instead of the non-indexed version whenever possible for performance reasons.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil.ALL_POSwill return the full result set.- Parameters:
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 (optionallynull).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 (optionallynull)- Returns:
- the matching users
-
search
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) -
search
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> orderByComparator) 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. It is preferable to use the indexed versionsearch(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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil.ALL_POSwill return the full result set.- Parameters:
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 (optionallynull). For more information seeUserFinder.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)orderByComparator- the comparator to order the users by (optionallynull)- Returns:
- the matching users
- See Also:
-
UserFinder
-
search
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) 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. It is preferable to use this method instead of the non-indexed version whenever possible for performance reasons.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil.ALL_POSwill return the full result set.- Parameters:
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 (optionallynull).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 (optionallynull)- Returns:
- the matching users
-
search
-
searchBySocial
public List<com.liferay.portal.kernel.model.User> searchBySocial(long userId, int[] socialRelationTypes, String keywords, int start, int end) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchBySocial
-
searchBySocial
-
searchBySocial
public List<com.liferay.portal.kernel.model.User> searchBySocial(long[] groupIds, long userId, int[] socialRelationTypes, String keywords, int start, int end) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchCount
public int searchCount(long companyId, String keywords, int status, LinkedHashMap<String, Object> params) Returns the number of users who match the keywords and status.- Parameters:
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 (optionallynull). For more information seeUserFinder.- Returns:
- the number matching users
-
searchCount
public 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.- Parameters:
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 (optionallynull). For more information seeUserFinder.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'".- Returns:
- the number of matching users
-
searchCounts
-
searchUsers
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- Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchUsers
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- Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchUsers
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- Throws:
com.liferay.portal.kernel.exception.PortalException
-
searchUsers
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- Throws:
com.liferay.portal.kernel.exception.PortalException
-
sendEmailAddressVerification
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 Sends an email address verification to the user.- Parameters:
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.- Throws:
com.liferay.portal.kernel.exception.PortalException
-
sendEmailUserCreationAttempt
public boolean sendEmailUserCreationAttempt(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 - Throws:
com.liferay.portal.kernel.exception.PortalException
-
sendPassword
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 - Throws:
com.liferay.portal.kernel.exception.PortalException
-
sendPasswordByEmailAddress
public boolean sendPasswordByEmailAddress(long companyId, String emailAddress) throws com.liferay.portal.kernel.exception.PortalException Sends a password notification email to the user matching the email address. The portal's settings determine whether a password is sent explicitly or whether a link for resetting the user's password is sent. The method sends the email asynchronously and returns before the email is sent.The content of the notification email is specified with the
admin.email.passwordportal property keys. They can be overridden via aportal-ext.propertiesfile or modified through the Portal Settings UI.- Parameters:
companyId- the primary key of the user's companyemailAddress- the user's email address- Returns:
trueif the notification email includes a new password;falseif the notification email only contains a reset link- Throws:
com.liferay.portal.kernel.exception.PortalException
-
sendPasswordByScreenName
public boolean sendPasswordByScreenName(long companyId, String screenName) throws com.liferay.portal.kernel.exception.PortalException Sends a password notification email to the user matching the screen name. The portal's settings determine whether a password is sent explicitly or whether a link for resetting the user's password is sent. The method sends the email asynchronously and returns before the email is sent.The content of the notification email is specified with the
admin.email.passwordportal property keys. They can be overridden via aportal-ext.propertiesfile or modified through the Portal Settings UI.- Parameters:
companyId- the primary key of the user's companyscreenName- the user's screen name- Returns:
trueif the notification email includes a new password;falseif the notification email only contains a reset link- Throws:
com.liferay.portal.kernel.exception.PortalException
-
sendPasswordByUserId
public boolean sendPasswordByUserId(long userId) throws com.liferay.portal.kernel.exception.PortalException Sends a password notification email to the user matching the ID. The portal's settings determine whether a password is sent explicitly or whether a link for resetting the user's password is sent. The method sends the email asynchronously and returns before the email is sent.The content of the notification email is specified with the
admin.email.passwordportal property keys. They can be overridden via aportal-ext.propertiesfile or modified through the Portal Settings UI.- Parameters:
userId- the user's primary key- Returns:
trueif the notification email includes a new password;falseif the notification email only contains a reset link- Throws:
com.liferay.portal.kernel.exception.PortalException
-
sendPasswordLockout
public boolean sendPasswordLockout(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 - Throws:
com.liferay.portal.kernel.exception.PortalException
-
setRoleUsers
public void setRoleUsers(long roleId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException Sets the users in the role, removing and adding users to the role as necessary.- Specified by:
setRoleUsersin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
setRoleUsersin classUserLocalServiceBaseImpl- Parameters:
roleId- the primary key of the roleuserIds- the primary keys of the users- Throws:
com.liferay.portal.kernel.exception.PortalException
-
setUserGroupUsers
public void setUserGroupUsers(long userGroupId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException Sets the users in the user group, removing and adding users to the user group as necessary.- Specified by:
setUserGroupUsersin interfacecom.liferay.portal.kernel.service.UserLocalService- Overrides:
setUserGroupUsersin classUserLocalServiceBaseImpl- Parameters:
userGroupId- the primary key of the user groupuserIds- the primary keys of the users- Throws:
com.liferay.portal.kernel.exception.PortalException
-
unsetGroupTeamsUsers
public void unsetGroupTeamsUsers(long groupId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException Removes the users from the teams of a group.- Parameters:
groupId- the primary key of the groupuserIds- the primary keys of the users- Throws:
com.liferay.portal.kernel.exception.PortalException
-
unsetGroupUsers
public void unsetGroupUsers(long groupId, long[] userIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException Removes the users from the group.- Parameters:
groupId- the primary key of the groupuserIds- the primary keys of the usersserviceContext- the service context to be applied (optionallynull)- Throws:
com.liferay.portal.kernel.exception.PortalException
-
unsetOrganizationUsers
public void unsetOrganizationUsers(long organizationId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException Removes the users from the organization.- Parameters:
organizationId- the primary key of the organizationuserIds- the primary keys of the users- Throws:
com.liferay.portal.kernel.exception.PortalException
-
unsetPasswordPolicyUsers
public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds) Removes the users from the password policy.- Parameters:
passwordPolicyId- the primary key of the password policyuserIds- the primary keys of the users
-
unsetRoleUsers
public void unsetRoleUsers(long roleId, List<com.liferay.portal.kernel.model.User> users) throws com.liferay.portal.kernel.exception.PortalException Removes the users from the role.- Parameters:
roleId- the primary key of the roleusers- the users- Throws:
com.liferay.portal.kernel.exception.PortalException
-
unsetRoleUsers
public void unsetRoleUsers(long roleId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException Removes the users from the role.- Parameters:
roleId- the primary key of the roleuserIds- the primary keys of the users- Throws:
com.liferay.portal.kernel.exception.PortalException
-
unsetTeamUsers
public void unsetTeamUsers(long teamId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException Removes the users from the team.- Parameters:
teamId- the primary key of the teamuserIds- the primary keys of the users- Throws:
com.liferay.portal.kernel.exception.PortalException
-
unsetUserGroupUsers
public void unsetUserGroupUsers(long userGroupId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException Removes the users from the user group.- Parameters:
userGroupId- the primary key of the user groupuserIds- the primary keys of the users- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateAgreedToTermsOfUse
@CTAware(onProduction=true) public com.liferay.portal.kernel.model.User updateAgreedToTermsOfUse(long userId, boolean agreedToTermsOfUse) throws com.liferay.portal.kernel.exception.PortalException Updates whether the user has agreed to the terms of use.- Parameters:
userId- the primary key of the useragreedToTermsOfUse- whether the user has agreet to the terms of use- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateAsset
public void updateAsset(long userId, com.liferay.portal.kernel.model.User user, long[] assetCategoryIds, String[] assetTagNames) throws com.liferay.portal.kernel.exception.PortalException Updates the user's asset with the new asset categories and tag names, removing and adding asset categories and tag names as necessary.- Parameters:
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 names- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateCreateDate
public com.liferay.portal.kernel.model.User updateCreateDate(long userId, Date createDate) throws com.liferay.portal.kernel.exception.PortalException Updates the user's creation date.- Parameters:
userId- the primary key of the usercreateDate- the new creation date- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateEmailAddress
@Indexable(type=REINDEX) public com.liferay.portal.kernel.model.User updateEmailAddress(long userId, String password, String emailAddress1, String emailAddress2) throws com.liferay.portal.kernel.exception.PortalException Updates the user's email address.- Parameters:
userId- the primary key of the userpassword- the user's passwordemailAddress1- the user's new email addressemailAddress2- the user's new email address confirmation- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateEmailAddress
@Indexable(type=REINDEX) 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 Updates the user's email address or sends verification email.- Parameters:
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.- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateEmailAddressVerified
@CTAware(onProduction=true) public com.liferay.portal.kernel.model.User updateEmailAddressVerified(long userId, boolean emailAddressVerified) throws com.liferay.portal.kernel.exception.PortalException Updates whether the user has verified email address.- Parameters:
userId- the primary key of the useremailAddressVerified- whether the user has verified email address- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateExternalReferenceCode
@Indexable(type=REINDEX) public com.liferay.portal.kernel.model.User updateExternalReferenceCode(long userId, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateExternalReferenceCode
@Indexable(type=REINDEX) public com.liferay.portal.kernel.model.User updateExternalReferenceCode(com.liferay.portal.kernel.model.User user, String externalReferenceCode) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateFacebookId
@Deprecated public com.liferay.portal.kernel.model.User updateFacebookId(long userId, long facebookId) throws com.liferay.portal.kernel.exception.PortalException Deprecated.As of Athanasius (7.3.x), with no direct replacementUpdates the user's Facebook ID.- Parameters:
userId- the primary key of the userfacebookId- the user's new Facebook ID- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateGoogleUserId
public com.liferay.portal.kernel.model.User updateGoogleUserId(long userId, String googleUserId) throws com.liferay.portal.kernel.exception.PortalException Updates the user's Google user ID.- Parameters:
userId- the primary key of the usergoogleUserId- the new Google user ID- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateGroups
public void updateGroups(long userId, long[] newGroupIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException Sets the groups the user is in, removing and adding groups as necessary.- Parameters:
userId- the primary key of the usernewGroupIds- the primary keys of the groupsserviceContext- the service context to be applied (optionallynull)- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateIncompleteUser
public com.liferay.portal.kernel.model.User updateIncompleteUser(long creatorUserId, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, 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 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.- Parameters:
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 addresslocale- the user's localefirstName- the user's first namemiddleName- the user's middle namelastName- the user's last nameprefixListTypeId- the user's name prefix IDsuffixListTypeId- 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 (optionallynull). Can set expando bridge attributes for the user.- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateJobTitle
@Indexable(type=REINDEX) public com.liferay.portal.kernel.model.User updateJobTitle(long userId, String jobTitle) throws com.liferay.portal.kernel.exception.PortalException Updates the user's job title.- Parameters:
userId- the primary key of the userjobTitle- the user's job title- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateLanguageId
public com.liferay.portal.kernel.model.User updateLanguageId(long userId, String languageId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateLastLogin
@Indexable(callbackKey="com.liferay.portal.kernel.model.User#lastLoginDate", type=REINDEX) @Transactional(enabled=false) public com.liferay.portal.kernel.model.User updateLastLogin(long userId, String loginIP) throws com.liferay.portal.kernel.exception.PortalException Updates the user's last login with the current time and the IP address.- Parameters:
userId- the primary key of the userloginIP- the IP address the user logged in from- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateLastLogin
@Indexable(callbackKey="com.liferay.portal.kernel.model.User#lastLoginDate", type=REINDEX) @Transactional(enabled=false) public com.liferay.portal.kernel.model.User updateLastLogin(com.liferay.portal.kernel.model.User user, String loginIP) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateLockout
public com.liferay.portal.kernel.model.User updateLockout(com.liferay.portal.kernel.model.User user, boolean lockout) throws com.liferay.portal.kernel.exception.PortalException Updates whether the user is locked out from logging in.- Parameters:
user- the userlockout- whether the user is locked out- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateLockoutByEmailAddress
public com.liferay.portal.kernel.model.User updateLockoutByEmailAddress(long companyId, String emailAddress, boolean lockout) throws com.liferay.portal.kernel.exception.PortalException Updates whether the user is locked out from logging in.- Parameters:
companyId- the primary key of the user's companyemailAddress- the user's email addresslockout- whether the user is locked out- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateLockoutById
public com.liferay.portal.kernel.model.User updateLockoutById(long userId, boolean lockout) throws com.liferay.portal.kernel.exception.PortalException Updates whether the user is locked out from logging in.- Parameters:
userId- the primary key of the userlockout- whether the user is locked out- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateLockoutByScreenName
public com.liferay.portal.kernel.model.User updateLockoutByScreenName(long companyId, String screenName, boolean lockout) throws com.liferay.portal.kernel.exception.PortalException Updates whether the user is locked out from logging in.- Parameters:
companyId- the primary key of the user's companyscreenName- the user's screen namelockout- whether the user is locked out- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateModifiedDate
@Indexable(type=REINDEX) public com.liferay.portal.kernel.model.User updateModifiedDate(long userId, Date modifiedDate) throws com.liferay.portal.kernel.exception.PortalException Updates the user's modified date.- Parameters:
userId- the primary key of the usermodifiedDate- the new modified date- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateOpenId
@Deprecated public com.liferay.portal.kernel.model.User updateOpenId(long userId, String openId) throws com.liferay.portal.kernel.exception.PortalException Deprecated.As of Athanasius (7.3.x), with no direct replacementUpdates the user's OpenID.- Parameters:
userId- the primary key of the useropenId- the new OpenID- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateOrganizations
public void updateOrganizations(long userId, long[] newOrganizationIds, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException Sets the organizations that the user is in, removing and adding organizations as necessary.- Parameters:
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.- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updatePassword
@CTAware(onProduction=true) public com.liferay.portal.kernel.model.User updatePassword(long userId, String password1, String password2, boolean passwordReset) throws com.liferay.portal.kernel.exception.PortalException Updates the user's password without tracking or validation of the change.- Parameters:
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 in- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updatePassword
@CTAware(onProduction=true) 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 Updates the user's password, optionally with tracking and validation of the change.- Parameters:
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.- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updatePasswordManually
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 Updates the user's password with manually input information. This method should only be used when performing maintenance.- Parameters:
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 date- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updatePasswordReset
@CTAware(onProduction=true) public com.liferay.portal.kernel.model.User updatePasswordReset(long userId, boolean passwordReset) throws com.liferay.portal.kernel.exception.PortalException Updates whether the user should be asked to reset their password the next time they login.- Parameters:
userId- the primary key of the userpasswordReset- whether the user should be asked to reset their password the next time they login- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updatePortrait
public com.liferay.portal.kernel.model.User updatePortrait(long userId, byte[] bytes) throws com.liferay.portal.kernel.exception.PortalException Updates the user's portrait image.- Parameters:
userId- the primary key of the userbytes- the new portrait image data- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateReminderQuery
@CTAware(onProduction=true) public com.liferay.portal.kernel.model.User updateReminderQuery(long userId, String question, String answer) throws com.liferay.portal.kernel.exception.PortalException Updates the user's password reset question and answer.- Parameters:
userId- the primary key of the userquestion- the user's new password reset questionanswer- the user's new password reset answer- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateScreenName
@Indexable(type=REINDEX) public com.liferay.portal.kernel.model.User updateScreenName(long userId, String screenName) throws com.liferay.portal.kernel.exception.PortalException Updates the user's screen name.- Parameters:
userId- the primary key of the userscreenName- the user's new screen name- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateStatus
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 Updates the user's workflow status.- Parameters:
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 attributepasswordUnencrypted.- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateStatus
public com.liferay.portal.kernel.model.User updateStatus(com.liferay.portal.kernel.model.User user, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateUser
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, boolean hasPortrait, byte[] portraitBytes, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, long prefixListTypeId, long suffixListTypeId, 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 Updates the user.- Parameters:
userId- the primary key of the useroldPassword- the user's old passwordnewPassword1- the user's new password (optionallynull)newPassword2- the user's new password confirmation (optionallynull)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 addresshasPortrait- if the user has a custom 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 nameprefixListTypeId- the user's new name prefix IDsuffixListTypeId- 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 (optionallynull). Can set the UUID (with theuuidattribute), asset category IDs, asset tag names, and expando bridge attributes for the user.- Returns:
- the user
- Throws:
com.liferay.portal.kernel.exception.PortalException
-
validateMaxUsers
public void validateMaxUsers(long companyId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
verifyEmailAddress
public void verifyEmailAddress(String ticketKey) throws com.liferay.portal.kernel.exception.PortalException Verifies the email address of the ticket.- Parameters:
ticketKey- the ticket key- Throws:
com.liferay.portal.kernel.exception.PortalException
-
addDefaultRolesAndTeams
protected void addDefaultRolesAndTeams(long groupId, long[] userIds) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
authenticate
protected int authenticate(long companyId, String login, String password, String authType, Map<String, String[]> headerMap, Map<String, throws com.liferay.portal.kernel.exception.PortalExceptionString[]> parameterMap, Map<String, Object> resultsMap) Attempts to authenticate the user by their login and password, while using the AuthPipeline.Authentication type specifies what
logincontains.The valid values are:-
CompanyConstants.AUTH_TYPE_EA-loginis the user's email address -
CompanyConstants.AUTH_TYPE_SN-loginis the user's screen name -
CompanyConstants.AUTH_TYPE_ID-loginis the user's primary key
- Parameters:
companyId- the primary key of the user's companylogin- either the user's email address, screen name, or primary key depending on the value ofauthTypepassword- 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 keyuserId.- Returns:
- the authentication status. This can be
Authenticator.FAILUREindicating that the user's credentials are invalid,Authenticator.SUCCESSindicating a successful login, orAuthenticator.DNEindicating that a user with that login does not exist. - Throws:
com.liferay.portal.kernel.exception.PortalException- See Also:
-
-
buildSearchContext
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) -
doCheckLockout
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 - Throws:
com.liferay.portal.kernel.exception.PortalException
-
doCheckPasswordExpired
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 - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getBirthday
protected Date getBirthday(int birthdayMonth, int birthdayDay, int birthdayYear) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
getLogin
-
getSorts
protected com.liferay.portal.kernel.search.Sort[] getSorts(com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> orderByComparator) -
handleAuthenticationFailure
-
isUseCustomSQL
-
isUserAllowedToAuthenticate
protected boolean isUserAllowedToAuthenticate(com.liferay.portal.kernel.model.User user) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
notifyUser
protected void notifyUser(com.liferay.portal.kernel.model.User user, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
reindex
protected void reindex(List<com.liferay.portal.kernel.model.User> users) throws com.liferay.portal.kernel.search.SearchException - Throws:
com.liferay.portal.kernel.search.SearchException
-
reindex
protected void reindex(long userId) throws com.liferay.portal.kernel.search.SearchException - Throws:
com.liferay.portal.kernel.search.SearchException
-
reindex
protected void reindex(long[] userIds) throws com.liferay.portal.kernel.search.SearchException - Throws:
com.liferay.portal.kernel.search.SearchException
-
reindex
protected void reindex(com.liferay.portal.kernel.model.User user) throws com.liferay.portal.kernel.search.SearchException - Throws:
com.liferay.portal.kernel.search.SearchException
-
resetFailedLoginAttempts
protected com.liferay.portal.kernel.model.User resetFailedLoginAttempts(com.liferay.portal.kernel.model.User user) -
resetFailedLoginAttempts
protected com.liferay.portal.kernel.model.User resetFailedLoginAttempts(com.liferay.portal.kernel.model.User user, boolean forceUpdate) -
searchUsers
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 - Throws:
com.liferay.portal.kernel.exception.PortalException
-
sendPasswordNotification
-
setEmailAddress
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 - Throws:
com.liferay.portal.kernel.exception.PortalException
-
trackPassword
protected void trackPassword(com.liferay.portal.kernel.model.User user) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
unsetUserGroups
protected void unsetUserGroups(long userId, long[] groupIds) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
unsetUserOrganizations
protected void unsetUserOrganizations(long userId, long[] organizationIds) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateGroups
protected void updateGroups(long userId, long[] newGroupIds, boolean indexingEnabled) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateOrganizations
protected void updateOrganizations(long userId, long[] newOrganizationIds, boolean indexingEnabled) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
updateUserGroupRoles
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 - Throws:
com.liferay.portal.kernel.exception.PortalException
-
validate
protected void validate(long companyId, long userId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long ldapServerId, String openId, String firstName, String middleName, String lastName, long[] organizationIds, Locale locale) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
validate
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 - Throws:
com.liferay.portal.kernel.exception.PortalException
-
validateEmailAddress
protected void validateEmailAddress(long companyId, String emailAddress) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
validateEmailAddress
protected void validateEmailAddress(com.liferay.portal.kernel.model.User user, String emailAddress1, String emailAddress2) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
validateFullName
protected void validateFullName(long companyId, String firstName, String middleName, String lastName, Locale locale) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
validateGoogleUserId
protected void validateGoogleUserId(long companyId, long userId, String googleUserId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
validateOpenId
protected void validateOpenId(long companyId, long userId, String openId) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
validatePassword
protected void validatePassword(long userId, String password1, String password2) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
validateReminderQuery
protected void validateReminderQuery(long companyId, String question, String answer) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-
validateScreenName
protected void validateScreenName(long companyId, long userId, String screenName) throws com.liferay.portal.kernel.exception.PortalException - Throws:
com.liferay.portal.kernel.exception.PortalException
-