Class UserLocalServiceWrapper
- All Implemented Interfaces:
BaseLocalService,CTService<User>,PersistedModelLocalService,ServiceWrapper<UserLocalService>,UserLocalService
UserLocalService.- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDefaultAdminUser(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.addDefaultServiceAccountUser(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) booleanaddGroupUser(long groupId, User user) booleanaddGroupUsers(long groupId, long[] userIds) booleanaddGroupUsers(long groupId, List<User> users) booleanaddOrganizationUser(long organizationId, long userId) booleanaddOrganizationUser(long organizationId, User user) booleanaddOrganizationUsers(long organizationId, long[] userIds) booleanaddOrganizationUsers(long organizationId, List<User> users) 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, 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) booleanaddRoleUser(long roleId, User user) booleanaddRoleUsers(long roleId, long[] userIds) booleanaddRoleUsers(long roleId, List<User> users) booleanaddTeamUser(long teamId, long userId) booleanaddTeamUser(long teamId, User user) booleanaddTeamUsers(long teamId, long[] userIds) booleanaddTeamUsers(long teamId, List<User> users) 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, ServiceContext serviceContext) Adds a user.Adds the user to the database.booleanaddUserGroupUser(long userGroupId, long userId) booleanaddUserGroupUser(long userGroupId, User user) booleanaddUserGroupUsers(long userGroupId, long[] userIds) booleanaddUserGroupUsers(long userGroupId, List<User> users) 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, ServiceContext serviceContext) Adds a user with workflow.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 replacementvoidcheckLockout(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(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(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.voidclearGroupUsers(long groupId) voidclearOrganizationUsers(long organizationId) voidclearRoleUsers(long roleId) voidclearTeamUsers(long teamId) voidclearUserGroupUsers(long userGroupId) voidcompleteUserRegistration(User user, ServiceContext serviceContext) Completes the user's registration by generating a password and sending the confirmation email.createPersistedModel(Serializable primaryKeyObj) createUser(long userId) Creates a new user with the primary key.voiddeleteGroupUser(long groupId, long userId) voiddeleteGroupUser(long groupId, User user) voiddeleteGroupUsers(long groupId, long[] userIds) voiddeleteGroupUsers(long groupId, List<User> users) voiddeleteOrganizationUser(long organizationId, long userId) voiddeleteOrganizationUser(long organizationId, User user) voiddeleteOrganizationUsers(long organizationId, long[] userIds) voiddeleteOrganizationUsers(long organizationId, List<User> users) deletePersistedModel(PersistedModel persistedModel) voiddeletePortrait(long userId) Deletes the user's portrait image.voiddeleteRoleUser(long roleId, long userId) voiddeleteRoleUser(long roleId, User user) voiddeleteRoleUsers(long roleId, long[] userIds) voiddeleteRoleUsers(long roleId, List<User> users) voiddeleteTeamUser(long teamId, long userId) voiddeleteTeamUser(long teamId, User user) voiddeleteTeamUsers(long teamId, long[] userIds) voiddeleteTeamUsers(long teamId, List<User> users) deleteUser(long userId) Deletes the user with the primary key from the database.deleteUser(User user) Deletes the user from the database.voiddeleteUserGroupUser(long userGroupId, long userId) voiddeleteUserGroupUser(long userGroupId, User user) voiddeleteUserGroupUsers(long userGroupId, long[] userIds) voiddeleteUserGroupUsers(long userGroupId, List<User> users) <T> TdslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) intdslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) <T> List<T>dynamicQuery(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.<T> List<T>dynamicQuery(DynamicQuery dynamicQuery, int start, int end) Performs a dynamic query on the database and returns a range of the matching rows.<T> List<T>dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.longdynamicQueryCount(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.longdynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.encryptUserId(String name) Encrypts the primary key of the user.fetchGuestUser(long companyId) Returns the guest user for the company.fetchUser(long userId) fetchUserByContactId(long contactId) Returns the user with the contact ID.fetchUserByEmailAddress(long companyId, String emailAddress) Returns the user with the email address.fetchUserByExternalReferenceCode(String externalReferenceCode, long companyId) fetchUserByFacebookId(long companyId, long facebookId) Deprecated.As of Athanasius (7.3.x), with no direct replacementfetchUserByGoogleUserId(long companyId, String googleUserId) Returns the user with the Google user ID.fetchUserById(long userId) Returns the user with the primary key.fetchUserByOpenId(long companyId, String openId) Deprecated.As of Athanasius (7.3.x), with no direct replacementfetchUserByPortraitId(long portraitId) Returns the user with the portrait ID.fetchUserByScreenName(long companyId, String screenName) Returns the user with the screen name.fetchUserByUuidAndCompanyId(String uuid, long companyId) Returns the user with the matching UUID and company.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.getDefaultUser(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)getExportActionableDynamicQuery(PortletDataContext portletDataContext) long[]getGroupPrimaryKeys(long userId) Returns the groupIds of the groups associated with the user.long[]getGroupUserIds(long groupId) Returns the primary keys of all the users belonging to the group.getGroupUsers(long groupId) getGroupUsers(long groupId, int start, int end) getGroupUsers(long groupId, int status, int start, int end, OrderByComparator<User> orderByComparator) Returns the users belonging to a group.getGroupUsers(long groupId, int start, int end, OrderByComparator<User> orderByComparator) getGroupUsers(long groupId, int status, OrderByComparator<User> orderByComparator) Returns the users belonging to a group.intgetGroupUsersCount(long groupId) intgetGroupUsersCount(long groupId, int status) Returns the number of users with the status belonging to the group.getGuestUser(long companyId) Returns the guest user for the company.longgetGuestUserId(long companyId) Returns the primary key of the guest user for the company.getInheritedRoleUsers(long roleId, int start, int end, OrderByComparator<User> orderByComparator) Returns all the users who have not had any announcements of the type delivered, excluding the default user.Returns all the users who do not belong to any groups, excluding the default user.long[]getOrganizationPrimaryKeys(long userId) Returns the organizationIds of the organizations associated with the user.intgetOrganizationsAndUserGroupsUsersCount(long[] organizationIds, long[] userGroupIds) long[]getOrganizationUserIds(long organizationId) Returns the primary keys of all the users belonging to the organization.getOrganizationUsers(long organizationId) getOrganizationUsers(long organizationId, int start, int end) getOrganizationUsers(long organizationId, int status, int start, int end, OrderByComparator<User> orderByComparator) Returns the users belonging to the organization with the status.getOrganizationUsers(long organizationId, int start, int end, OrderByComparator<User> orderByComparator) getOrganizationUsers(long organizationId, int status, OrderByComparator<User> orderByComparator) Returns the users belonging to the organization with the status.intgetOrganizationUsersCount(long organizationId) intgetOrganizationUsersCount(long organizationId, int status) Returns the number of users with the status belonging to the organization.Returns the OSGi service identifier.getPersistedModel(Serializable primaryKeyObj) long[]getRolePrimaryKeys(long userId) Returns the roleIds of the roles associated with the user.long[]getRoleUserIds(long roleId) Returns the primary keys of all the users belonging to the role.long[]getRoleUserIds(long roleId, long type) getRoleUsers(long roleId) getRoleUsers(long roleId, int start, int end) getRoleUsers(long roleId, int start, int end, OrderByComparator<User> orderByComparator) intgetRoleUsersCount(long roleId) intgetRoleUsersCount(long roleId, int status) Returns the number of users with the status belonging to the role.getSocialUsers(long userId, int socialRelationType, String socialRelationTypeComparator, int start, int end, OrderByComparator<User> orderByComparator) getSocialUsers(long userId1, long userId2, int socialRelationType, int start, int end, OrderByComparator<User> orderByComparator) Returns an ordered range of all the users with a mutual social relation of the type with both of the given users.getSocialUsers(long userId1, long userId2, int start, int end, OrderByComparator<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.long[]getTeamPrimaryKeys(long userId) Returns the teamIds of the teams associated with the user.getTeamUsers(long teamId) getTeamUsers(long teamId, int start, int end) getTeamUsers(long teamId, int start, int end, OrderByComparator<User> orderByComparator) intgetTeamUsersCount(long teamId) getUser(long userId) Returns the user with the primary key.getUserByContactId(long contactId) Returns the user with the contact ID.getUserByEmailAddress(long companyId, String emailAddress) Returns the user with the email address.getUserByExternalReferenceCode(String externalReferenceCode, long companyId) getUserByFacebookId(long companyId, long facebookId) Deprecated.As of Athanasius (7.3.x), with no direct replacementgetUserByGoogleUserId(long companyId, String googleUserId) Returns the user with the Google user ID.getUserById(long userId) Returns the user with the primary key.getUserById(long companyId, long userId) Returns the user with the primary key from the company.getUserByOpenId(long companyId, String openId) Deprecated.As of Athanasius (7.3.x), with no direct replacementgetUserByPortraitId(long portraitId) Returns the user with the portrait ID.getUserByScreenName(long companyId, String screenName) Returns the user with the screen name.getUserByUuidAndCompanyId(String uuid, long companyId) Returns the user with the matching UUID and company.long[]getUserGroupPrimaryKeys(long userId) Returns the userGroupIds of the user groups associated with the user.getUserGroupUsers(long userGroupId) getUserGroupUsers(long userGroupId, int start, int end) getUserGroupUsers(long userGroupId, int start, int end, OrderByComparator<User> orderByComparator) intgetUserGroupUsersCount(long userGroupId) 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.getUsers(int start, int end) Returns a range of all the users.getUsers(long companyId, int status, int start, int end, OrderByComparator<User> orderByComparator) getUsersByRoleId(long roleId, int start, int end) getUsersByRoleName(long companyId, String roleName, int start, int end) intReturns the number of users.intgetUsersCount(long companyId, int status) booleanhasGroupUser(long groupId, long userId) booleanhasGroupUsers(long groupId) booleanhasOrganizationUser(long organizationId, long userId) booleanhasOrganizationUsers(long organizationId) booleanhasPasswordPolicyUser(long passwordPolicyId, long userId) Returnstrueif the password policy has been assigned to the user.booleanhasRoleUser(long roleId, long userId) booleanhasRoleUser(long companyId, String name, long userId, boolean inherited) Returnstrueif the user has the role with the name, optionally through inheritance.booleanhasRoleUsers(long roleId) booleanhasTeamUser(long teamId, long userId) booleanhasTeamUsers(long teamId) booleanhasUserGroupUser(long userGroupId, long userId) booleanhasUserGroupUsers(long userGroupId) booleanisPasswordExpired(User user) Returnstrueif the user's password is expired.loadGetGuestUser(long companyId) Returns the guest user for the company.search(long companyId, String keywords, int status, LinkedHashMap<String, Object> params, int start, int end, Sort sort) Returns an ordered range of all the users who match the keywords and status, using the indexer.search(long companyId, String keywords, int status, LinkedHashMap<String, Object> params, int start, int end, Sort[] sorts) search(long companyId, String keywords, int status, LinkedHashMap<String, Object> params, int start, int end, OrderByComparator<User> orderByComparator) Returns an ordered range of all the users who match the keywords and status, without using the indexer.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, 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.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, Sort[] sorts) 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, OrderByComparator<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.searchBySocial(long[] groupIds, long userId, int[] socialRelationTypes, String keywords, int start, int end) searchBySocial(long userId, int[] socialRelationTypes, String keywords, int start, int end) searchBySocial(long companyId, long[] groupIds, long[] userGroupIds, String keywords, int start, int end) searchBySocial(long companyId, long[] groupIds, long[] userGroupIds, String keywords, int start, int end, OrderByComparator<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) searchUsers(long companyId, String keywords, int status, LinkedHashMap<String, Object> params, int start, int end, Sort sort) searchUsers(long companyId, String keywords, int status, LinkedHashMap<String, Object> params, int start, int end, Sort[] sorts) 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, Sort sort) 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, Sort[] sorts) voidsendEmailAddressVerification(User user, String emailAddress, ServiceContext serviceContext) Sends an email address verification to the user.booleansendEmailUserCreationAttempt(long companyId, String emailAddress, String fromName, String fromAddress, String subject, String body, ServiceContext serviceContext) booleansendPassword(long companyId, String emailAddress, String fromName, String fromAddress, String subject, String body, 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, ServiceContext serviceContext) voidsetGroupUsers(long groupId, long[] userIds) voidsetOrganizationUsers(long organizationId, long[] userIds) voidsetRoleUsers(long roleId, long[] userIds) voidsetTeamUsers(long teamId, long[] userIds) voidsetUserGroupUsers(long userGroupId, long[] userIds) voidsetWrappedService(UserLocalService userLocalService) voidunsetGroupTeamsUsers(long groupId, long[] userIds) Removes the users from the teams of a group.voidunsetGroupUsers(long groupId, long[] userIds, 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<User> users) Removes the users from the role.voidunsetTeamUsers(long teamId, long[] userIds) Removes the users from the team.voidunsetUserGroupUsers(long userGroupId, long[] userIds) Removes the users from the user group.updateAgreedToTermsOfUse(long userId, boolean agreedToTermsOfUse) Updates whether the user has agreed to the terms of use.voidupdateAsset(long userId, 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.updateCreateDate(long userId, Date createDate) Updates the user's creation date.updateEmailAddress(long userId, String password, String emailAddress1, String emailAddress2) Updates the user's email address.updateEmailAddress(long userId, String password, String emailAddress1, String emailAddress2, ServiceContext serviceContext) Updates the user's email address or sends verification email.updateEmailAddressVerified(long userId, boolean emailAddressVerified) Updates whether the user has verified email address.updateExternalReferenceCode(long userId, String externalReferenceCode) updateExternalReferenceCode(User user, String externalReferenceCode) updateFacebookId(long userId, long facebookId) Deprecated.As of Athanasius (7.3.x), with no direct replacementupdateGoogleUserId(long userId, String googleUserId) Updates the user's Google user ID.voidupdateGroups(long userId, long[] newGroupIds, ServiceContext serviceContext) Sets the groups the user is in, removing and adding groups as necessary.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, 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.updateJobTitle(long userId, String jobTitle) Updates the user's job title.updateLanguageId(long userId, String languageId) updateLastLogin(long userId, String loginIP) Updates the user's last login with the current time and the IP address.updateLastLogin(User user, String loginIP) updateLockout(User user, boolean lockout) Updates whether the user is locked out from logging in.updateLockoutByEmailAddress(long companyId, String emailAddress, boolean lockout) Updates whether the user is locked out from logging in.updateLockoutById(long userId, boolean lockout) Updates whether the user is locked out from logging in.updateLockoutByScreenName(long companyId, String screenName, boolean lockout) Updates whether the user is locked out from logging in.updateModifiedDate(long userId, Date modifiedDate) Updates the user's modified date.updateOpenId(long userId, String openId) Deprecated.As of Athanasius (7.3.x), with no direct replacementvoidupdateOrganizations(long userId, long[] newOrganizationIds, ServiceContext serviceContext) Sets the organizations that the user is in, removing and adding organizations as necessary.updatePassword(long userId, String password1, String password2, boolean passwordReset) Updates the user's password without tracking or validation of the change.updatePassword(long userId, String password1, String password2, boolean passwordReset, boolean silentUpdate) Updates the user's password, optionally with tracking and validation of the change.updatePasswordManually(long userId, String password, boolean passwordEncrypted, boolean passwordReset, Date passwordModifiedDate) Updates the user's password with manually input information.updatePasswordReset(long userId, boolean passwordReset) Updates whether the user should be asked to reset their password the next time they login.updatePortrait(long userId, byte[] bytes) Updates the user's portrait image.updateReminderQuery(long userId, String question, String answer) Updates the user's password reset question and answer.updateScreenName(long userId, String screenName) Updates the user's screen name.updateStatus(long userId, int status, ServiceContext serviceContext) Updates the user's workflow status.updateStatus(User user, int status, ServiceContext serviceContext) 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<UserGroupRole> userGroupRoles, long[] userGroupIds, ServiceContext serviceContext) Updates the user.updateUser(User user) Updates the user in the database or adds it if it does not yet exist.<R,E extends Throwable>
RupdateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<User>, R, E> updateUnsafeFunction) voidvalidateMaxUsers(long companyId) voidverifyEmailAddress(String ticketKey) Verifies the email address of the ticket.Methods 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
-
Constructor Details
-
UserLocalServiceWrapper
public UserLocalServiceWrapper() -
UserLocalServiceWrapper
-
-
Method Details
-
addDefaultAdminUser
public User addDefaultAdminUser(long companyId, String password, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName) throws PortalException Adds a default admin user for the company.- Specified by:
addDefaultAdminUserin interfaceUserLocalService- 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:
PortalException
-
addDefaultGroups
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.- Specified by:
addDefaultGroupsin interfaceUserLocalService- Parameters:
userId- the primary key of the user- Returns:
trueif user was added to default groups;falseif user was already a member- Throws:
PortalException
-
addDefaultRoles
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.- Specified by:
addDefaultRolesin interfaceUserLocalService- Parameters:
userId- the primary key of the user- Returns:
trueif user was given default roles;falseif user already has default roles- Throws:
PortalException
-
addDefaultServiceAccountUser
- Specified by:
addDefaultServiceAccountUserin interfaceUserLocalService- Throws:
PortalException
-
addDefaultUserGroups
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.- Specified by:
addDefaultUserGroupsin interfaceUserLocalService- 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:
PortalException
-
addGroupUser
public boolean addGroupUser(long groupId, long userId) - Specified by:
addGroupUserin interfaceUserLocalService
-
addGroupUser
- Specified by:
addGroupUserin interfaceUserLocalService
-
addGroupUsers
- Specified by:
addGroupUsersin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
addGroupUsers
- Specified by:
addGroupUsersin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
addOrganizationUser
public boolean addOrganizationUser(long organizationId, long userId) - Specified by:
addOrganizationUserin interfaceUserLocalService
-
addOrganizationUser
- Specified by:
addOrganizationUserin interfaceUserLocalService
-
addOrganizationUsers
- Specified by:
addOrganizationUsersin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
addOrganizationUsers
- Specified by:
addOrganizationUsersin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
addOrUpdateUser
public 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, ServiceContext serviceContext) throws PortalException - Specified by:
addOrUpdateUserin interfaceUserLocalService- Throws:
PortalException
-
addPasswordPolicyUsers
public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds) Assigns the password policy to the users, removing any other currently assigned password policies.- Specified by:
addPasswordPolicyUsersin interfaceUserLocalService- Parameters:
passwordPolicyId- the primary key of the password policyuserIds- the primary keys of the users
-
addRoleUser
public boolean addRoleUser(long roleId, long userId) - Specified by:
addRoleUserin interfaceUserLocalService
-
addRoleUser
- Specified by:
addRoleUserin interfaceUserLocalService
-
addRoleUsers
- Specified by:
addRoleUsersin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
addRoleUsers
- Specified by:
addRoleUsersin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
addTeamUser
public boolean addTeamUser(long teamId, long userId) - Specified by:
addTeamUserin interfaceUserLocalService
-
addTeamUser
- Specified by:
addTeamUserin interfaceUserLocalService
-
addTeamUsers
- Specified by:
addTeamUsersin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
addTeamUsers
- Specified by:
addTeamUsersin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
addUser
public 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, ServiceContext serviceContext) throws 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.
- Specified by:
addUserin interfaceUserLocalService- 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:
PortalException
-
addUser
Adds the user to the database. Also notifies the appropriate model listeners.Important: Inspect UserLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Specified by:
addUserin interfaceUserLocalService- Parameters:
user- the user- Returns:
- the user that was added
-
addUserGroupUser
public boolean addUserGroupUser(long userGroupId, long userId) - Specified by:
addUserGroupUserin interfaceUserLocalService
-
addUserGroupUser
- Specified by:
addUserGroupUserin interfaceUserLocalService
-
addUserGroupUsers
- Specified by:
addUserGroupUsersin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
addUserGroupUsers
- Specified by:
addUserGroupUsersin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
addUserWithWorkflow
public 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, ServiceContext serviceContext) throws 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.
- Specified by:
addUserWithWorkflowin interfaceUserLocalService- 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:
PortalException
-
authenticateByEmailAddress
public int authenticateByEmailAddress(long companyId, String emailAddress, String password, Map<String, String[]> headerMap, Map<String, throws PortalExceptionString[]> parameterMap, Map<String, Object> resultsMap) Attempts to authenticate the user by their email address and password, while using the AuthPipeline.- Specified by:
authenticateByEmailAddressin interfaceUserLocalService- 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:
PortalException- See Also:
-
AuthPipeline
-
authenticateByScreenName
public int authenticateByScreenName(long companyId, String screenName, String password, Map<String, String[]> headerMap, Map<String, throws PortalExceptionString[]> parameterMap, Map<String, Object> resultsMap) Attempts to authenticate the user by their screen name and password, while using the AuthPipeline.- Specified by:
authenticateByScreenNamein interfaceUserLocalService- 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:
PortalException- See Also:
-
AuthPipeline
-
authenticateByUserId
public int authenticateByUserId(long companyId, long userId, String password, Map<String, String[]> headerMap, Map<String, throws PortalExceptionString[]> parameterMap, Map<String, Object> resultsMap) Attempts to authenticate the user by their primary key and password, while using the AuthPipeline.- Specified by:
authenticateByUserIdin interfaceUserLocalService- 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:
PortalException- See Also:
-
AuthPipeline
-
authenticateForBasic
public long authenticateForBasic(long companyId, String authType, String login, String password) throws 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
- Specified by:
authenticateForBasicin interfaceUserLocalService- 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:
PortalException
-
-
authenticateForDigest
@Deprecated public long authenticateForDigest(long companyId, String userName, String realm, String nonce, String method, String uri, String response) throws 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.- Specified by:
authenticateForDigestin interfaceUserLocalService- 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:
PortalException
-
checkLockout
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.- Specified by:
checkLockoutin interfaceUserLocalService- Parameters:
user- the user- Throws:
PortalException
-
checkLoginFailure
Adds a failed login attempt to the user and updates the user's last failed login date.- Specified by:
checkLoginFailurein interfaceUserLocalService- Parameters:
user- the user
-
checkLoginFailureByEmailAddress
public void checkLoginFailureByEmailAddress(long companyId, String emailAddress) throws PortalException Adds a failed login attempt to the user with the email address and updates the user's last failed login date.- Specified by:
checkLoginFailureByEmailAddressin interfaceUserLocalService- Parameters:
companyId- the primary key of the user's companyemailAddress- the user's email address- Throws:
PortalException
-
checkLoginFailureById
Adds a failed login attempt to the user and updates the user's last failed login date.- Specified by:
checkLoginFailureByIdin interfaceUserLocalService- Parameters:
userId- the primary key of the user- Throws:
PortalException
-
checkLoginFailureByScreenName
Adds a failed login attempt to the user with the screen name and updates the user's last failed login date.- Specified by:
checkLoginFailureByScreenNamein interfaceUserLocalService- Parameters:
companyId- the primary key of the user's companyscreenName- the user's screen name- Throws:
PortalException
-
checkPasswordExpired
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.- Specified by:
checkPasswordExpiredin interfaceUserLocalService- Parameters:
user- the user- Throws:
PortalException
-
clearGroupUsers
public void clearGroupUsers(long groupId) - Specified by:
clearGroupUsersin interfaceUserLocalService
-
clearOrganizationUsers
public void clearOrganizationUsers(long organizationId) - Specified by:
clearOrganizationUsersin interfaceUserLocalService
-
clearRoleUsers
public void clearRoleUsers(long roleId) - Specified by:
clearRoleUsersin interfaceUserLocalService
-
clearTeamUsers
public void clearTeamUsers(long teamId) - Specified by:
clearTeamUsersin interfaceUserLocalService
-
clearUserGroupUsers
public void clearUserGroupUsers(long userGroupId) - Specified by:
clearUserGroupUsersin interfaceUserLocalService
-
completeUserRegistration
public void completeUserRegistration(User user, ServiceContext serviceContext) throws PortalException Completes the user's registration by generating a password and sending the confirmation email.- Specified by:
completeUserRegistrationin interfaceUserLocalService- 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:
PortalException
-
createPersistedModel
- Specified by:
createPersistedModelin interfacePersistedModelLocalService- Specified by:
createPersistedModelin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
createUser
Creates a new user with the primary key. Does not add the user to the database.- Specified by:
createUserin interfaceUserLocalService- Parameters:
userId- the primary key for the new user- Returns:
- the new user
-
deleteGroupUser
public void deleteGroupUser(long groupId, long userId) - Specified by:
deleteGroupUserin interfaceUserLocalService
-
deleteGroupUser
- Specified by:
deleteGroupUserin interfaceUserLocalService
-
deleteGroupUsers
- Specified by:
deleteGroupUsersin interfaceUserLocalService
-
deleteGroupUsers
public void deleteGroupUsers(long groupId, long[] userIds) - Specified by:
deleteGroupUsersin interfaceUserLocalService
-
deleteOrganizationUser
public void deleteOrganizationUser(long organizationId, long userId) - Specified by:
deleteOrganizationUserin interfaceUserLocalService
-
deleteOrganizationUser
- Specified by:
deleteOrganizationUserin interfaceUserLocalService
-
deleteOrganizationUsers
- Specified by:
deleteOrganizationUsersin interfaceUserLocalService
-
deleteOrganizationUsers
public void deleteOrganizationUsers(long organizationId, long[] userIds) - Specified by:
deleteOrganizationUsersin interfaceUserLocalService
-
deletePersistedModel
- Specified by:
deletePersistedModelin interfacePersistedModelLocalService- Specified by:
deletePersistedModelin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
deletePortrait
Deletes the user's portrait image.- Specified by:
deletePortraitin interfaceUserLocalService- Parameters:
userId- the primary key of the user- Throws:
PortalException
-
deleteRoleUser
- Specified by:
deleteRoleUserin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
deleteRoleUser
- Specified by:
deleteRoleUserin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
deleteRoleUsers
- Specified by:
deleteRoleUsersin interfaceUserLocalService
-
deleteRoleUsers
public void deleteRoleUsers(long roleId, long[] userIds) - Specified by:
deleteRoleUsersin interfaceUserLocalService
-
deleteTeamUser
public void deleteTeamUser(long teamId, long userId) - Specified by:
deleteTeamUserin interfaceUserLocalService
-
deleteTeamUser
- Specified by:
deleteTeamUserin interfaceUserLocalService
-
deleteTeamUsers
- Specified by:
deleteTeamUsersin interfaceUserLocalService
-
deleteTeamUsers
public void deleteTeamUsers(long teamId, long[] userIds) - Specified by:
deleteTeamUsersin interfaceUserLocalService
-
deleteUser
Deletes the user with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect UserLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Specified by:
deleteUserin interfaceUserLocalService- Parameters:
userId- the primary key of the user- Returns:
- the user that was removed
- Throws:
PortalException- if a user with the primary key could not be foundPortalException
-
deleteUser
Deletes the user from the database. Also notifies the appropriate model listeners.Important: Inspect UserLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Specified by:
deleteUserin interfaceUserLocalService- Parameters:
user- the user- Returns:
- the user that was removed
- Throws:
PortalExceptionPortalException
-
deleteUserGroupUser
- Specified by:
deleteUserGroupUserin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
deleteUserGroupUser
- Specified by:
deleteUserGroupUserin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
deleteUserGroupUsers
- Specified by:
deleteUserGroupUsersin interfaceUserLocalService
-
deleteUserGroupUsers
public void deleteUserGroupUsers(long userGroupId, long[] userIds) - Specified by:
deleteUserGroupUsersin interfaceUserLocalService
-
dslQuery
public <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryin interfacePersistedModelLocalService- Specified by:
dslQueryin interfaceUserLocalService
-
dslQueryCount
public int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryCountin interfacePersistedModelLocalService- Specified by:
dslQueryCountin interfaceUserLocalService
-
dynamicQuery
- Specified by:
dynamicQueryin interfaceUserLocalService
-
dynamicQuery
Performs a dynamic query on the database and returns the matching rows.- Specified by:
dynamicQueryin interfaceUserLocalService- Parameters:
dynamicQuery- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
Performs a dynamic query on the database and returns a range of the matching rows.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 bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.UserModelImpl.- Specified by:
dynamicQueryin interfaceUserLocalService- Parameters:
dynamicQuery- the dynamic querystart- the lower bound of the range of model instancesend- the upper bound of the range of model instances (not inclusive)- Returns:
- the range of matching rows
-
dynamicQuery
public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.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 bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.UserModelImpl.- Specified by:
dynamicQueryin interfaceUserLocalService- Parameters:
dynamicQuery- the dynamic querystart- the lower bound of the range of model instancesend- the upper bound of the range of model instances (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of matching rows
-
dynamicQueryCount
Returns the number of rows matching the dynamic query.- Specified by:
dynamicQueryCountin interfaceUserLocalService- Parameters:
dynamicQuery- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
Returns the number of rows matching the dynamic query.- Specified by:
dynamicQueryCountin interfaceUserLocalService- Parameters:
dynamicQuery- the dynamic queryprojection- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
encryptUserId
Encrypts the primary key of the user. Used when encrypting the user's credentials for storage in an automatic login cookie.- Specified by:
encryptUserIdin interfaceUserLocalService- Parameters:
name- the primary key of the user- Returns:
- the user's encrypted primary key
- Throws:
PortalException
-
fetchGuestUser
Returns the guest user for the company.- Specified by:
fetchGuestUserin interfaceUserLocalService- 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
-
fetchUser
- Specified by:
fetchUserin interfaceUserLocalService
-
fetchUserByContactId
Returns the user with the contact ID.- Specified by:
fetchUserByContactIdin interfaceUserLocalService- 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
Returns the user with the email address.- Specified by:
fetchUserByEmailAddressin interfaceUserLocalService- 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
-
fetchUserByExternalReferenceCode
- Specified by:
fetchUserByExternalReferenceCodein interfaceUserLocalService
-
fetchUserByFacebookId
Deprecated.As of Athanasius (7.3.x), with no direct replacementReturns the user with the Facebook ID.- Specified by:
fetchUserByFacebookIdin interfaceUserLocalService- 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
Returns the user with the Google user ID.- Specified by:
fetchUserByGoogleUserIdin interfaceUserLocalService- 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
Returns the user with the primary key.- Specified by:
fetchUserByIdin interfaceUserLocalService- 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.As of Athanasius (7.3.x), with no direct replacementReturns the user with the OpenID.- Specified by:
fetchUserByOpenIdin interfaceUserLocalService- 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
Returns the user with the portrait ID.- Specified by:
fetchUserByPortraitIdin interfaceUserLocalService- 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
Returns the user with the screen name.- Specified by:
fetchUserByScreenNamein interfaceUserLocalService- 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
-
fetchUserByUuidAndCompanyId
Returns the user with the matching UUID and company.- Specified by:
fetchUserByUuidAndCompanyIdin interfaceUserLocalService- Parameters:
uuid- the user's UUIDcompanyId- the primary key of the company- Returns:
- the matching user, or
nullif a matching user could not be found
-
getActionableDynamicQuery
- Specified by:
getActionableDynamicQueryin interfaceUserLocalService
-
getCompanyUsers
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.- Specified by:
getCompanyUsersin interfaceUserLocalService- 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.- Specified by:
getCompanyUsersCountin interfaceUserLocalService- Parameters:
companyId- the primary key of the company- Returns:
- the number of users belonging to the company
-
getDefaultUser
Deprecated.As of Cavanaugh (7.4.x), replaced bygetGuestUser(long)- Specified by:
getDefaultUserin interfaceUserLocalService- Throws:
PortalException
-
getDefaultUserId
Deprecated.As of Cavanaugh (7.4.x), replaced bygetGuestUserId(long)- Specified by:
getDefaultUserIdin interfaceUserLocalService- Throws:
PortalException
-
getExportActionableDynamicQuery
public ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext) - Specified by:
getExportActionableDynamicQueryin interfaceUserLocalService
-
getGroupPrimaryKeys
public long[] getGroupPrimaryKeys(long userId) Returns the groupIds of the groups associated with the user.- Specified by:
getGroupPrimaryKeysin interfaceUserLocalService- Parameters:
userId- the userId of the user- Returns:
- long[] the groupIds of groups associated with the user
-
getGroupUserIds
public long[] getGroupUserIds(long groupId) Returns the primary keys of all the users belonging to the group.- Specified by:
getGroupUserIdsin interfaceUserLocalService- Parameters:
groupId- the primary key of the group- Returns:
- the primary keys of the users belonging to the group
-
getGroupUsers
- Specified by:
getGroupUsersin interfaceUserLocalService
-
getGroupUsers
- Specified by:
getGroupUsersin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
getGroupUsers
public List<User> getGroupUsers(long groupId, int status, int start, int end, OrderByComparator<User> orderByComparator) throws PortalException Returns the users belonging to a group.- Specified by:
getGroupUsersin interfaceUserLocalService- 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:
PortalException
-
getGroupUsers
public List<User> getGroupUsers(long groupId, int start, int end, OrderByComparator<User> orderByComparator) - Specified by:
getGroupUsersin interfaceUserLocalService
-
getGroupUsers
public List<User> getGroupUsers(long groupId, int status, OrderByComparator<User> orderByComparator) throws PortalException Returns the users belonging to a group.- Specified by:
getGroupUsersin interfaceUserLocalService- Parameters:
groupId- the primary key of the groupstatus- the workflow statusorderByComparator- the comparator to order the users by (optionallynull)- Returns:
- the matching users
- Throws:
PortalException
-
getGroupUsersCount
public int getGroupUsersCount(long groupId) - Specified by:
getGroupUsersCountin interfaceUserLocalService
-
getGroupUsersCount
Returns the number of users with the status belonging to the group.- Specified by:
getGroupUsersCountin interfaceUserLocalService- Parameters:
groupId- the primary key of the groupstatus- the workflow status- Returns:
- the number of users with the status belonging to the group
- Throws:
PortalException
-
getGuestUser
Returns the guest user for the company.- Specified by:
getGuestUserin interfaceUserLocalService- Parameters:
companyId- the primary key of the company- Returns:
- the guest user for the company
- Throws:
PortalException
-
getGuestUserId
Returns the primary key of the guest user for the company.- Specified by:
getGuestUserIdin interfaceUserLocalService- Parameters:
companyId- the primary key of the company- Returns:
- the primary key of the guest user for the company
- Throws:
PortalException
-
getIndexableActionableDynamicQuery
- Specified by:
getIndexableActionableDynamicQueryin interfaceUserLocalService
-
getInheritedRoleUsers
public List<User> getInheritedRoleUsers(long roleId, int start, int end, OrderByComparator<User> orderByComparator) throws PortalException - Specified by:
getInheritedRoleUsersin interfaceUserLocalService- Throws:
PortalException
-
getNoAnnouncementsDeliveries
Returns all the users who have not had any announcements of the type delivered, excluding the default user.- Specified by:
getNoAnnouncementsDeliveriesin interfaceUserLocalService- 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.- Specified by:
getNoGroupsin interfaceUserLocalService- Returns:
- the users who do not belong to any groups
-
getOrganizationPrimaryKeys
public long[] getOrganizationPrimaryKeys(long userId) Returns the organizationIds of the organizations associated with the user.- Specified by:
getOrganizationPrimaryKeysin interfaceUserLocalService- Parameters:
userId- the userId of the user- Returns:
- long[] the organizationIds of organizations associated with the user
-
getOrganizationsAndUserGroupsUsersCount
public int getOrganizationsAndUserGroupsUsersCount(long[] organizationIds, long[] userGroupIds) - Specified by:
getOrganizationsAndUserGroupsUsersCountin interfaceUserLocalService
-
getOrganizationUserIds
public long[] getOrganizationUserIds(long organizationId) Returns the primary keys of all the users belonging to the organization.- Specified by:
getOrganizationUserIdsin interfaceUserLocalService- Parameters:
organizationId- the primary key of the organization- Returns:
- the primary keys of the users belonging to the organization
-
getOrganizationUsers
- Specified by:
getOrganizationUsersin interfaceUserLocalService
-
getOrganizationUsers
public List<User> getOrganizationUsers(long organizationId, int start, int end) throws PortalException - Specified by:
getOrganizationUsersin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
getOrganizationUsers
public List<User> getOrganizationUsers(long organizationId, int status, int start, int end, OrderByComparator<User> orderByComparator) throws PortalException Returns the users belonging to the organization with the status.- Specified by:
getOrganizationUsersin interfaceUserLocalService- 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:
PortalException
-
getOrganizationUsers
public List<User> getOrganizationUsers(long organizationId, int start, int end, OrderByComparator<User> orderByComparator) - Specified by:
getOrganizationUsersin interfaceUserLocalService
-
getOrganizationUsers
public List<User> getOrganizationUsers(long organizationId, int status, OrderByComparator<User> orderByComparator) throws PortalException Returns the users belonging to the organization with the status.- Specified by:
getOrganizationUsersin interfaceUserLocalService- Parameters:
organizationId- the primary key of the organizationstatus- the workflow statusorderByComparator- the comparator to order the users by (optionallynull)- Returns:
- the matching users
- Throws:
PortalException
-
getOrganizationUsersCount
public int getOrganizationUsersCount(long organizationId) - Specified by:
getOrganizationUsersCountin interfaceUserLocalService
-
getOrganizationUsersCount
Returns the number of users with the status belonging to the organization.- Specified by:
getOrganizationUsersCountin interfaceUserLocalService- Parameters:
organizationId- the primary key of the organizationstatus- the workflow status- Returns:
- the number of users with the status belonging to the organization
- Throws:
PortalException
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Specified by:
getOSGiServiceIdentifierin interfaceUserLocalService- Returns:
- the OSGi service identifier
-
getPersistedModel
- Specified by:
getPersistedModelin interfacePersistedModelLocalService- Specified by:
getPersistedModelin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
getRolePrimaryKeys
public long[] getRolePrimaryKeys(long userId) Returns the roleIds of the roles associated with the user.- Specified by:
getRolePrimaryKeysin interfaceUserLocalService- Parameters:
userId- the userId of the user- Returns:
- long[] the roleIds of roles associated with the user
-
getRoleUserIds
public long[] getRoleUserIds(long roleId) Returns the primary keys of all the users belonging to the role.- Specified by:
getRoleUserIdsin interfaceUserLocalService- 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) - Specified by:
getRoleUserIdsin interfaceUserLocalService
-
getRoleUsers
- Specified by:
getRoleUsersin interfaceUserLocalService
-
getRoleUsers
- Specified by:
getRoleUsersin interfaceUserLocalService
-
getRoleUsers
public List<User> getRoleUsers(long roleId, int start, int end, OrderByComparator<User> orderByComparator) - Specified by:
getRoleUsersin interfaceUserLocalService
-
getRoleUsersCount
public int getRoleUsersCount(long roleId) - Specified by:
getRoleUsersCountin interfaceUserLocalService
-
getRoleUsersCount
Returns the number of users with the status belonging to the role.- Specified by:
getRoleUsersCountin interfaceUserLocalService- Parameters:
roleId- the primary key of the rolestatus- the workflow status- Returns:
- the number of users with the status belonging to the role
- Throws:
PortalException
-
getSocialUsers
public List<User> getSocialUsers(long userId, int socialRelationType, String socialRelationTypeComparator, int start, int end, OrderByComparator<User> orderByComparator) throws PortalException - Specified by:
getSocialUsersin interfaceUserLocalService- Throws:
PortalException
-
getSocialUsers
public List<User> getSocialUsers(long userId1, long userId2, int socialRelationType, int start, int end, OrderByComparator<User> orderByComparator) throws 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.- Specified by:
getSocialUsersin interfaceUserLocalService- 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:
PortalException
-
getSocialUsers
public List<User> getSocialUsers(long userId1, long userId2, int start, int end, OrderByComparator<User> orderByComparator) throws 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.- Specified by:
getSocialUsersin interfaceUserLocalService- 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:
PortalException
-
getSocialUsersCount
public int getSocialUsersCount(long userId, int socialRelationType, String socialRelationTypeComparator) throws PortalException Returns the number of users with a social relation with the user.- Specified by:
getSocialUsersCountin interfaceUserLocalService- 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:
PortalException
-
getSocialUsersCount
Returns the number of users with a mutual social relation with both of the given users.- Specified by:
getSocialUsersCountin interfaceUserLocalService- 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:
PortalException
-
getSocialUsersCount
public int getSocialUsersCount(long userId1, long userId2, int socialRelationType) throws PortalException Returns the number of users with a mutual social relation of the type with both of the given users.- Specified by:
getSocialUsersCountin interfaceUserLocalService- 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:
PortalException
-
getTeamPrimaryKeys
public long[] getTeamPrimaryKeys(long userId) Returns the teamIds of the teams associated with the user.- Specified by:
getTeamPrimaryKeysin interfaceUserLocalService- Parameters:
userId- the userId of the user- Returns:
- long[] the teamIds of teams associated with the user
-
getTeamUsers
- Specified by:
getTeamUsersin interfaceUserLocalService
-
getTeamUsers
- Specified by:
getTeamUsersin interfaceUserLocalService
-
getTeamUsers
public List<User> getTeamUsers(long teamId, int start, int end, OrderByComparator<User> orderByComparator) - Specified by:
getTeamUsersin interfaceUserLocalService
-
getTeamUsersCount
public int getTeamUsersCount(long teamId) - Specified by:
getTeamUsersCountin interfaceUserLocalService
-
getUser
Returns the user with the primary key.- Specified by:
getUserin interfaceUserLocalService- Parameters:
userId- the primary key of the user- Returns:
- the user
- Throws:
PortalException- if a user with the primary key could not be foundPortalException
-
getUserByContactId
Returns the user with the contact ID.- Specified by:
getUserByContactIdin interfaceUserLocalService- Parameters:
contactId- the user's contact ID- Returns:
- the user with the contact ID
- Throws:
PortalException
-
getUserByEmailAddress
Returns the user with the email address.- Specified by:
getUserByEmailAddressin interfaceUserLocalService- Parameters:
companyId- the primary key of the user's companyemailAddress- the user's email address- Returns:
- the user with the email address
- Throws:
PortalException
-
getUserByExternalReferenceCode
public User getUserByExternalReferenceCode(String externalReferenceCode, long companyId) throws PortalException - Specified by:
getUserByExternalReferenceCodein interfaceUserLocalService- Throws:
PortalException
-
getUserByFacebookId
Deprecated.As of Athanasius (7.3.x), with no direct replacementReturns the user with the Facebook ID.- Specified by:
getUserByFacebookIdin interfaceUserLocalService- Parameters:
companyId- the primary key of the user's companyfacebookId- the user's Facebook ID- Returns:
- the user with the Facebook ID
- Throws:
PortalException
-
getUserByGoogleUserId
Returns the user with the Google user ID.- Specified by:
getUserByGoogleUserIdin interfaceUserLocalService- 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:
PortalException
-
getUserById
Returns the user with the primary key.- Specified by:
getUserByIdin interfaceUserLocalService- Parameters:
userId- the primary key of the user- Returns:
- the user with the primary key
- Throws:
PortalException
-
getUserById
Returns the user with the primary key from the company.- Specified by:
getUserByIdin interfaceUserLocalService- Parameters:
companyId- the primary key of the user's companyuserId- the primary key of the user- Returns:
- the user with the primary key
- Throws:
PortalException
-
getUserByOpenId
Deprecated.As of Athanasius (7.3.x), with no direct replacementReturns the user with the OpenID.- Specified by:
getUserByOpenIdin interfaceUserLocalService- Parameters:
companyId- the primary key of the user's companyopenId- the user's OpenID- Returns:
- the user with the OpenID
- Throws:
PortalException
-
getUserByPortraitId
Returns the user with the portrait ID.- Specified by:
getUserByPortraitIdin interfaceUserLocalService- Parameters:
portraitId- the user's portrait ID- Returns:
- the user with the portrait ID
- Throws:
PortalException
-
getUserByScreenName
Returns the user with the screen name.- Specified by:
getUserByScreenNamein interfaceUserLocalService- Parameters:
companyId- the primary key of the user's companyscreenName- the user's screen name- Returns:
- the user with the screen name
- Throws:
PortalException
-
getUserByUuidAndCompanyId
Returns the user with the matching UUID and company.- Specified by:
getUserByUuidAndCompanyIdin interfaceUserLocalService- Parameters:
uuid- the user's UUIDcompanyId- the primary key of the company- Returns:
- the matching user
- Throws:
PortalException- if a matching user could not be foundPortalException
-
getUserGroupPrimaryKeys
public long[] getUserGroupPrimaryKeys(long userId) Returns the userGroupIds of the user groups associated with the user.- Specified by:
getUserGroupPrimaryKeysin interfaceUserLocalService- Parameters:
userId- the userId of the user- Returns:
- long[] the userGroupIds of user groups associated with the user
-
getUserGroupUsers
- Specified by:
getUserGroupUsersin interfaceUserLocalService
-
getUserGroupUsers
- Specified by:
getUserGroupUsersin interfaceUserLocalService
-
getUserGroupUsers
public List<User> getUserGroupUsers(long userGroupId, int start, int end, OrderByComparator<User> orderByComparator) - Specified by:
getUserGroupUsersin interfaceUserLocalService
-
getUserGroupUsersCount
public int getUserGroupUsersCount(long userGroupId) - Specified by:
getUserGroupUsersCountin interfaceUserLocalService
-
getUserGroupUsersCount
Returns the number of users with the status belonging to the user group.- Specified by:
getUserGroupUsersCountin interfaceUserLocalService- 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:
PortalException
-
getUserIdByEmailAddress
Returns the primary key of the user with the email address.- Specified by:
getUserIdByEmailAddressin interfaceUserLocalService- 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:
PortalException
-
getUserIdByScreenName
Returns the primary key of the user with the screen name.- Specified by:
getUserIdByScreenNamein interfaceUserLocalService- 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:
PortalException
-
getUsers
Returns a range of all the 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 bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.UserModelImpl.- Specified by:
getUsersin interfaceUserLocalService- Parameters:
start- the lower bound of the range of usersend- the upper bound of the range of users (not inclusive)- Returns:
- the range of users
-
getUsers
public List<User> getUsers(long companyId, int status, int start, int end, OrderByComparator<User> orderByComparator) - Specified by:
getUsersin interfaceUserLocalService
-
getUsersByRoleId
- Specified by:
getUsersByRoleIdin interfaceUserLocalService- Throws:
PortalException
-
getUsersByRoleName
public List<User> getUsersByRoleName(long companyId, String roleName, int start, int end) throws PortalException - Specified by:
getUsersByRoleNamein interfaceUserLocalService- Throws:
PortalException
-
getUsersCount
public int getUsersCount()Returns the number of users.- Specified by:
getUsersCountin interfaceUserLocalService- Returns:
- the number of users
-
getUsersCount
public int getUsersCount(long companyId, int status) - Specified by:
getUsersCountin interfaceUserLocalService
-
hasGroupUser
public boolean hasGroupUser(long groupId, long userId) - Specified by:
hasGroupUserin interfaceUserLocalService
-
hasGroupUsers
public boolean hasGroupUsers(long groupId) - Specified by:
hasGroupUsersin interfaceUserLocalService
-
hasOrganizationUser
public boolean hasOrganizationUser(long organizationId, long userId) - Specified by:
hasOrganizationUserin interfaceUserLocalService
-
hasOrganizationUsers
public boolean hasOrganizationUsers(long organizationId) - Specified by:
hasOrganizationUsersin interfaceUserLocalService
-
hasPasswordPolicyUser
public boolean hasPasswordPolicyUser(long passwordPolicyId, long userId) Returnstrueif the password policy has been assigned to the user.- Specified by:
hasPasswordPolicyUserin interfaceUserLocalService- 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 roleId, long userId) - Specified by:
hasRoleUserin interfaceUserLocalService
-
hasRoleUser
public boolean hasRoleUser(long companyId, String name, long userId, boolean inherited) throws PortalException Returnstrueif the user has the role with the name, optionally through inheritance.- Specified by:
hasRoleUserin interfaceUserLocalService- 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:
PortalException
-
hasRoleUsers
public boolean hasRoleUsers(long roleId) - Specified by:
hasRoleUsersin interfaceUserLocalService
-
hasTeamUser
public boolean hasTeamUser(long teamId, long userId) - Specified by:
hasTeamUserin interfaceUserLocalService
-
hasTeamUsers
public boolean hasTeamUsers(long teamId) - Specified by:
hasTeamUsersin interfaceUserLocalService
-
hasUserGroupUser
public boolean hasUserGroupUser(long userGroupId, long userId) - Specified by:
hasUserGroupUserin interfaceUserLocalService
-
hasUserGroupUsers
public boolean hasUserGroupUsers(long userGroupId) - Specified by:
hasUserGroupUsersin interfaceUserLocalService
-
isPasswordExpired
Returnstrueif the user's password is expired.- Specified by:
isPasswordExpiredin interfaceUserLocalService- Parameters:
user- the user- Returns:
trueif the user's password is expired;falseotherwise- Throws:
PortalException
-
loadGetGuestUser
Returns the guest user for the company.- Specified by:
loadGetGuestUserin interfaceUserLocalService- Parameters:
companyId- the primary key of the company- Returns:
- the guest user for the company
- Throws:
PortalException
-
search
public List<User> search(long companyId, String keywords, int status, LinkedHashMap<String, Object> params, int start, int end, OrderByComparator<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.- Specified by:
searchin interfaceUserLocalService- 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:
-
search
public Hits search(long companyId, String keywords, int status, LinkedHashMap<String, Object> params, int start, int end, 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.- Specified by:
searchin interfaceUserLocalService- 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 Hits search(long companyId, String keywords, int status, LinkedHashMap<String, Object> params, int start, int end, Sort[] sorts) - Specified by:
searchin interfaceUserLocalService
-
search
public List<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, OrderByComparator<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.- Specified by:
searchin interfaceUserLocalService- 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:
-
search
public 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, 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.- Specified by:
searchin interfaceUserLocalService- 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
public 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, Sort[] sorts) - Specified by:
searchin interfaceUserLocalService
-
searchBySocial
public List<User> searchBySocial(long userId, int[] socialRelationTypes, String keywords, int start, int end) throws PortalException - Specified by:
searchBySocialin interfaceUserLocalService- Throws:
PortalException
-
searchBySocial
public List<User> searchBySocial(long companyId, long[] groupIds, long[] userGroupIds, String keywords, int start, int end) - Specified by:
searchBySocialin interfaceUserLocalService
-
searchBySocial
public List<User> searchBySocial(long companyId, long[] groupIds, long[] userGroupIds, String keywords, int start, int end, OrderByComparator<User> orderByComparator) - Specified by:
searchBySocialin interfaceUserLocalService
-
searchBySocial
public List<User> searchBySocial(long[] groupIds, long userId, int[] socialRelationTypes, String keywords, int start, int end) throws PortalException - Specified by:
searchBySocialin interfaceUserLocalService- Throws:
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.- Specified by:
searchCountin interfaceUserLocalService- 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.- Specified by:
searchCountin interfaceUserLocalService- 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
- Specified by:
searchCountsin interfaceUserLocalService
-
searchUsers
public BaseModelSearchResult<User> searchUsers(long companyId, String keywords, int status, LinkedHashMap<String, Object> params, int start, int end, Sort sort) throws PortalException- Specified by:
searchUsersin interfaceUserLocalService- Throws:
PortalException
-
searchUsers
public BaseModelSearchResult<User> searchUsers(long companyId, String keywords, int status, LinkedHashMap<String, Object> params, int start, int end, Sort[] sorts) throws PortalException- Specified by:
searchUsersin interfaceUserLocalService- Throws:
PortalException
-
searchUsers
public BaseModelSearchResult<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, Sort sort) throws PortalException- Specified by:
searchUsersin interfaceUserLocalService- Throws:
PortalException
-
searchUsers
public BaseModelSearchResult<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, Sort[] sorts) throws PortalException- Specified by:
searchUsersin interfaceUserLocalService- Throws:
PortalException
-
sendEmailAddressVerification
public void sendEmailAddressVerification(User user, String emailAddress, ServiceContext serviceContext) throws PortalException Sends an email address verification to the user.- Specified by:
sendEmailAddressVerificationin interfaceUserLocalService- 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:
PortalException
-
sendEmailUserCreationAttempt
public boolean sendEmailUserCreationAttempt(long companyId, String emailAddress, String fromName, String fromAddress, String subject, String body, ServiceContext serviceContext) throws PortalException - Specified by:
sendEmailUserCreationAttemptin interfaceUserLocalService- Throws:
PortalException
-
sendPassword
public boolean sendPassword(long companyId, String emailAddress, String fromName, String fromAddress, String subject, String body, ServiceContext serviceContext) throws PortalException - Specified by:
sendPasswordin interfaceUserLocalService- Throws:
PortalException
-
sendPasswordByEmailAddress
public boolean sendPasswordByEmailAddress(long companyId, String emailAddress) throws 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.- Specified by:
sendPasswordByEmailAddressin interfaceUserLocalService- 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:
PortalException
-
sendPasswordByScreenName
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.- Specified by:
sendPasswordByScreenNamein interfaceUserLocalService- 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:
PortalException
-
sendPasswordByUserId
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.- Specified by:
sendPasswordByUserIdin interfaceUserLocalService- 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:
PortalException
-
sendPasswordLockout
public boolean sendPasswordLockout(long companyId, String emailAddress, String fromName, String fromAddress, String subject, String body, ServiceContext serviceContext) throws PortalException - Specified by:
sendPasswordLockoutin interfaceUserLocalService- Throws:
PortalException
-
setGroupUsers
public void setGroupUsers(long groupId, long[] userIds) - Specified by:
setGroupUsersin interfaceUserLocalService
-
setOrganizationUsers
public void setOrganizationUsers(long organizationId, long[] userIds) - Specified by:
setOrganizationUsersin interfaceUserLocalService
-
setRoleUsers
- Specified by:
setRoleUsersin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
setTeamUsers
public void setTeamUsers(long teamId, long[] userIds) - Specified by:
setTeamUsersin interfaceUserLocalService
-
setUserGroupUsers
- Specified by:
setUserGroupUsersin interfaceUserLocalService- Throws:
PortalExceptionPortalException
-
unsetGroupTeamsUsers
Removes the users from the teams of a group.- Specified by:
unsetGroupTeamsUsersin interfaceUserLocalService- Parameters:
groupId- the primary key of the groupuserIds- the primary keys of the users- Throws:
PortalException
-
unsetGroupUsers
public void unsetGroupUsers(long groupId, long[] userIds, ServiceContext serviceContext) throws PortalException Removes the users from the group.- Specified by:
unsetGroupUsersin interfaceUserLocalService- Parameters:
groupId- the primary key of the groupuserIds- the primary keys of the usersserviceContext- the service context to be applied (optionallynull)- Throws:
PortalException
-
unsetOrganizationUsers
Removes the users from the organization.- Specified by:
unsetOrganizationUsersin interfaceUserLocalService- Parameters:
organizationId- the primary key of the organizationuserIds- the primary keys of the users- Throws:
PortalException
-
unsetPasswordPolicyUsers
public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds) Removes the users from the password policy.- Specified by:
unsetPasswordPolicyUsersin interfaceUserLocalService- Parameters:
passwordPolicyId- the primary key of the password policyuserIds- the primary keys of the users
-
unsetRoleUsers
Removes the users from the role.- Specified by:
unsetRoleUsersin interfaceUserLocalService- Parameters:
roleId- the primary key of the roleusers- the users- Throws:
PortalException
-
unsetRoleUsers
Removes the users from the role.- Specified by:
unsetRoleUsersin interfaceUserLocalService- Parameters:
roleId- the primary key of the roleuserIds- the primary keys of the users- Throws:
PortalException
-
unsetTeamUsers
Removes the users from the team.- Specified by:
unsetTeamUsersin interfaceUserLocalService- Parameters:
teamId- the primary key of the teamuserIds- the primary keys of the users- Throws:
PortalException
-
unsetUserGroupUsers
Removes the users from the user group.- Specified by:
unsetUserGroupUsersin interfaceUserLocalService- Parameters:
userGroupId- the primary key of the user groupuserIds- the primary keys of the users- Throws:
PortalException
-
updateAgreedToTermsOfUse
public User updateAgreedToTermsOfUse(long userId, boolean agreedToTermsOfUse) throws PortalException Updates whether the user has agreed to the terms of use.- Specified by:
updateAgreedToTermsOfUsein interfaceUserLocalService- Parameters:
userId- the primary key of the useragreedToTermsOfUse- whether the user has agreet to the terms of use- Returns:
- the user
- Throws:
PortalException
-
updateAsset
public void updateAsset(long userId, User user, long[] assetCategoryIds, String[] assetTagNames) throws PortalException Updates the user's asset with the new asset categories and tag names, removing and adding asset categories and tag names as necessary.- Specified by:
updateAssetin interfaceUserLocalService- 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:
PortalException
-
updateCreateDate
Updates the user's creation date.- Specified by:
updateCreateDatein interfaceUserLocalService- Parameters:
userId- the primary key of the usercreateDate- the new creation date- Returns:
- the user
- Throws:
PortalException
-
updateEmailAddress
public User updateEmailAddress(long userId, String password, String emailAddress1, String emailAddress2) throws PortalException Updates the user's email address.- Specified by:
updateEmailAddressin interfaceUserLocalService- 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:
PortalException
-
updateEmailAddress
public User updateEmailAddress(long userId, String password, String emailAddress1, String emailAddress2, ServiceContext serviceContext) throws PortalException Updates the user's email address or sends verification email.- Specified by:
updateEmailAddressin interfaceUserLocalService- 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:
PortalException
-
updateEmailAddressVerified
public User updateEmailAddressVerified(long userId, boolean emailAddressVerified) throws PortalException Updates whether the user has verified email address.- Specified by:
updateEmailAddressVerifiedin interfaceUserLocalService- Parameters:
userId- the primary key of the useremailAddressVerified- whether the user has verified email address- Returns:
- the user
- Throws:
PortalException
-
updateExternalReferenceCode
public User updateExternalReferenceCode(long userId, String externalReferenceCode) throws PortalException - Specified by:
updateExternalReferenceCodein interfaceUserLocalService- Throws:
PortalException
-
updateExternalReferenceCode
public User updateExternalReferenceCode(User user, String externalReferenceCode) throws PortalException - Specified by:
updateExternalReferenceCodein interfaceUserLocalService- Throws:
PortalException
-
updateFacebookId
Deprecated.As of Athanasius (7.3.x), with no direct replacementUpdates the user's Facebook ID.- Specified by:
updateFacebookIdin interfaceUserLocalService- Parameters:
userId- the primary key of the userfacebookId- the user's new Facebook ID- Returns:
- the user
- Throws:
PortalException
-
updateGoogleUserId
Updates the user's Google user ID.- Specified by:
updateGoogleUserIdin interfaceUserLocalService- Parameters:
userId- the primary key of the usergoogleUserId- the new Google user ID- Returns:
- the user
- Throws:
PortalException
-
updateGroups
public void updateGroups(long userId, long[] newGroupIds, ServiceContext serviceContext) throws PortalException Sets the groups the user is in, removing and adding groups as necessary.- Specified by:
updateGroupsin interfaceUserLocalService- Parameters:
userId- the primary key of the usernewGroupIds- the primary keys of the groupsserviceContext- the service context to be applied (optionallynull)- Throws:
PortalException
-
updateIncompleteUser
public 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, ServiceContext serviceContext) throws 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.- Specified by:
updateIncompleteUserin interfaceUserLocalService- 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:
PortalException
-
updateJobTitle
Updates the user's job title.- Specified by:
updateJobTitlein interfaceUserLocalService- Parameters:
userId- the primary key of the userjobTitle- the user's job title- Returns:
- the user
- Throws:
PortalException
-
updateLanguageId
- Specified by:
updateLanguageIdin interfaceUserLocalService- Throws:
PortalException
-
updateLastLogin
Updates the user's last login with the current time and the IP address.- Specified by:
updateLastLoginin interfaceUserLocalService- Parameters:
userId- the primary key of the userloginIP- the IP address the user logged in from- Returns:
- the user
- Throws:
PortalException
-
updateLastLogin
- Specified by:
updateLastLoginin interfaceUserLocalService- Throws:
PortalException
-
updateLockout
Updates whether the user is locked out from logging in.- Specified by:
updateLockoutin interfaceUserLocalService- Parameters:
user- the userlockout- whether the user is locked out- Returns:
- the user
- Throws:
PortalException
-
updateLockoutByEmailAddress
public User updateLockoutByEmailAddress(long companyId, String emailAddress, boolean lockout) throws PortalException Updates whether the user is locked out from logging in.- Specified by:
updateLockoutByEmailAddressin interfaceUserLocalService- 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:
PortalException
-
updateLockoutById
Updates whether the user is locked out from logging in.- Specified by:
updateLockoutByIdin interfaceUserLocalService- Parameters:
userId- the primary key of the userlockout- whether the user is locked out- Returns:
- the user
- Throws:
PortalException
-
updateLockoutByScreenName
public User updateLockoutByScreenName(long companyId, String screenName, boolean lockout) throws PortalException Updates whether the user is locked out from logging in.- Specified by:
updateLockoutByScreenNamein interfaceUserLocalService- 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:
PortalException
-
updateModifiedDate
Updates the user's modified date.- Specified by:
updateModifiedDatein interfaceUserLocalService- Parameters:
userId- the primary key of the usermodifiedDate- the new modified date- Returns:
- the user
- Throws:
PortalException
-
updateOpenId
Deprecated.As of Athanasius (7.3.x), with no direct replacementUpdates the user's OpenID.- Specified by:
updateOpenIdin interfaceUserLocalService- Parameters:
userId- the primary key of the useropenId- the new OpenID- Returns:
- the user
- Throws:
PortalException
-
updateOrganizations
public void updateOrganizations(long userId, long[] newOrganizationIds, ServiceContext serviceContext) throws PortalException Sets the organizations that the user is in, removing and adding organizations as necessary.- Specified by:
updateOrganizationsin interfaceUserLocalService- 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:
PortalException
-
updatePassword
public User updatePassword(long userId, String password1, String password2, boolean passwordReset) throws PortalException Updates the user's password without tracking or validation of the change.- Specified by:
updatePasswordin interfaceUserLocalService- 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:
PortalException
-
updatePassword
public User updatePassword(long userId, String password1, String password2, boolean passwordReset, boolean silentUpdate) throws PortalException Updates the user's password, optionally with tracking and validation of the change.- Specified by:
updatePasswordin interfaceUserLocalService- 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:
PortalException
-
updatePasswordManually
public User updatePasswordManually(long userId, String password, boolean passwordEncrypted, boolean passwordReset, Date passwordModifiedDate) throws PortalException Updates the user's password with manually input information. This method should only be used when performing maintenance.- Specified by:
updatePasswordManuallyin interfaceUserLocalService- 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:
PortalException
-
updatePasswordReset
Updates whether the user should be asked to reset their password the next time they login.- Specified by:
updatePasswordResetin interfaceUserLocalService- 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:
PortalException
-
updatePortrait
Updates the user's portrait image.- Specified by:
updatePortraitin interfaceUserLocalService- Parameters:
userId- the primary key of the userbytes- the new portrait image data- Returns:
- the user
- Throws:
PortalException
-
updateReminderQuery
Updates the user's password reset question and answer.- Specified by:
updateReminderQueryin interfaceUserLocalService- 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:
PortalException
-
updateScreenName
Updates the user's screen name.- Specified by:
updateScreenNamein interfaceUserLocalService- Parameters:
userId- the primary key of the userscreenName- the user's new screen name- Returns:
- the user
- Throws:
PortalException
-
updateStatus
public User updateStatus(long userId, int status, ServiceContext serviceContext) throws PortalException Updates the user's workflow status.- Specified by:
updateStatusin interfaceUserLocalService- 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:
PortalException
-
updateStatus
public User updateStatus(User user, int status, ServiceContext serviceContext) throws PortalException - Specified by:
updateStatusin interfaceUserLocalService- Throws:
PortalException
-
updateUser
public 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<UserGroupRole> userGroupRoles, long[] userGroupIds, ServiceContext serviceContext) throws PortalException Updates the user.- Specified by:
updateUserin interfaceUserLocalService- 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:
PortalException
-
updateUser
Updates the user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect UserLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Specified by:
updateUserin interfaceUserLocalService- Parameters:
user- the user- Returns:
- the user that was updated
-
validateMaxUsers
- Specified by:
validateMaxUsersin interfaceUserLocalService- Throws:
PortalException
-
verifyEmailAddress
Verifies the email address of the ticket.- Specified by:
verifyEmailAddressin interfaceUserLocalService- Parameters:
ticketKey- the ticket key- Throws:
PortalException
-
getBasePersistence
- Specified by:
getBasePersistencein interfacePersistedModelLocalService
-
getCTPersistence
- Specified by:
getCTPersistencein interfaceCTService<User>- Specified by:
getCTPersistencein interfaceUserLocalService
-
getModelClass
- Specified by:
getModelClassin interfaceCTService<User>- Specified by:
getModelClassin interfaceUserLocalService
-
updateWithUnsafeFunction
public <R,E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<User>, R, throws EE> updateUnsafeFunction) - Specified by:
updateWithUnsafeFunctionin interfaceCTService<User>- Specified by:
updateWithUnsafeFunctionin interfaceUserLocalService- Throws:
E extends Throwable
-
getWrappedService
- Specified by:
getWrappedServicein interfaceServiceWrapper<UserLocalService>
-
setWrappedService
- Specified by:
setWrappedServicein interfaceServiceWrapper<UserLocalService>
-