Liferay 7.0-ga1 portal-impl

com.liferay.portal.service.impl
Class UserLocalServiceImpl

java.lang.Object
  extended by com.liferay.portal.kernel.service.BaseLocalServiceImpl
      extended by com.liferay.portal.service.base.UserLocalServiceBaseImpl
          extended by com.liferay.portal.service.impl.UserLocalServiceImpl
All Implemented Interfaces:
com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService, com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.PersistedModelLocalService, com.liferay.portal.kernel.service.UserLocalService

public class UserLocalServiceImpl
extends UserLocalServiceBaseImpl

Provides the local service for accessing, adding, authenticating, deleting, and updating users.


Field Summary
protected  com.liferay.mail.kernel.service.MailService mailService
           
 
Fields inherited from class com.liferay.portal.service.base.UserLocalServiceBaseImpl
announcementsDeliveryLocalService, announcementsDeliveryPersistence, assetEntryFinder, assetEntryLocalService, assetEntryPersistence, blogsStatsUserFinder, blogsStatsUserLocalService, blogsStatsUserPersistence, browserTrackerLocalService, browserTrackerPersistence, companyLocalService, companyPersistence, contactLocalService, contactPersistence, counterLocalService, dlFileEntryFinder, dlFileEntryLocalService, dlFileEntryPersistence, dlFileRankFinder, dlFileRankLocalService, dlFileRankPersistence, expandoRowLocalService, expandoRowPersistence, groupFinder, groupLocalService, groupPersistence, imageLocalService, imagePersistence, layoutFinder, layoutLocalService, layoutPersistence, mbBanLocalService, mbBanPersistence, mbMessageFinder, mbMessageLocalService, mbMessagePersistence, mbStatsUserLocalService, mbStatsUserPersistence, mbThreadFlagLocalService, mbThreadFlagPersistence, membershipRequestLocalService, membershipRequestPersistence, organizationFinder, organizationLocalService, organizationPersistence, passwordPolicyFinder, passwordPolicyLocalService, passwordPolicyPersistence, passwordPolicyRelLocalService, passwordPolicyRelPersistence, passwordTrackerLocalService, passwordTrackerPersistence, persistedModelLocalServiceRegistry, ratingsStatsFinder, ratingsStatsLocalService, ratingsStatsPersistence, recentLayoutBranchLocalService, recentLayoutBranchPersistence, recentLayoutRevisionLocalService, recentLayoutRevisionPersistence, recentLayoutSetBranchLocalService, recentLayoutSetBranchPersistence, resourceLocalService, roleFinder, roleLocalService, rolePersistence, socialActivityFinder, socialActivityLocalService, socialActivityPersistence, socialRelationLocalService, socialRelationPersistence, socialRequestLocalService, socialRequestPersistence, subscriptionLocalService, subscriptionPersistence, teamFinder, teamLocalService, teamPersistence, ticketLocalService, ticketPersistence, userFinder, userGroupFinder, userGroupLocalService, userGroupPersistence, userGroupRoleFinder, userGroupRoleLocalService, userGroupRolePersistence, userIdMapperLocalService, userIdMapperPersistence, userLocalService, userPersistence, workflowInstanceLinkLocalService, workflowInstanceLinkPersistence
 
Constructor Summary
UserLocalServiceImpl()
           
 
Method Summary
 com.liferay.portal.kernel.model.User addDefaultAdminUser(long companyId, String screenName, String emailAddress, Locale locale, String firstName, String middleName, String lastName)
          Adds a default admin user for the company.
 void addDefaultGroups(long userId)
          Adds the user to the default groups, unless the user is already in these groups.
 void addDefaultRoles(long userId)
          Adds the user to the default regular roles, unless the user already has these regular roles.
protected  void addDefaultRolesAndTeams(long groupId, long[] userIds)
           
 void addDefaultUserGroups(long userId)
          Adds the user to the default user groups, unless the user is already in these user groups.
 void addGroupUsers(long groupId, long[] userIds)
          Adds the users to the group.
 void addOrganizationUsers(long organizationId, long[] userIds)
          Adds the users to the organization.
 void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
          Assigns the password policy to the users, removing any other currently assigned password policies.
 void addRoleUsers(long roleId, long[] userIds)
          Adds the users to the role.
 void addTeamUsers(long teamId, long[] userIds)
          Adds the users to the team.
 com.liferay.portal.kernel.model.User addUser(long creatorUserId, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, com.liferay.portal.kernel.service.ServiceContext serviceContext)
          Adds a user.
 void addUserGroupUsers(long userGroupId, long[] userIds)
          Adds the users to the user group.
 com.liferay.portal.kernel.model.User addUserWithWorkflow(long creatorUserId, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, long[] userGroupIds, boolean sendEmail, com.liferay.portal.kernel.service.ServiceContext serviceContext)
          Adds a user with workflow.
 void afterPropertiesSet()
           
protected  int authenticate(long companyId, String login, String password, String authType, Map<String,String[]> headerMap, Map<String,String[]> parameterMap, Map<String,Object> resultsMap)
          Attempts to authenticate the user by their login and password, while using the AuthPipeline.
 int authenticateByEmailAddress(long companyId, String emailAddress, String password, Map<String,String[]> headerMap, Map<String,String[]> parameterMap, Map<String,Object> resultsMap)
          Attempts to authenticate the user by their email address and password, while using the AuthPipeline.
 int authenticateByScreenName(long companyId, String screenName, String password, Map<String,String[]> headerMap, Map<String,String[]> parameterMap, Map<String,Object> resultsMap)
          Attempts to authenticate the user by their screen name and password, while using the AuthPipeline.
 int authenticateByUserId(long companyId, long userId, String password, Map<String,String[]> headerMap, Map<String,String[]> parameterMap, Map<String,Object> resultsMap)
          Attempts to authenticate the user by their primary key and password, while using the AuthPipeline.
 long authenticateForBasic(long companyId, String authType, String login, String password)
          Attempts to authenticate the user using HTTP basic access authentication, without using the AuthPipeline.
 long authenticateForDigest(long companyId, String username, String realm, String nonce, String method, String uri, String response)
          Attempts to authenticate the user using HTTP digest access authentication, without using the AuthPipeline.
 boolean authenticateForJAAS(long userId, String encPassword)
          Attempts to authenticate the user using JAAS credentials, without using the AuthPipeline.
protected  com.liferay.portal.kernel.search.SearchContext buildSearchContext(long companyId, String firstName, String middleName, String lastName, String fullName, String screenName, String emailAddress, String street, String city, String zip, String region, String country, int status, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, com.liferay.portal.kernel.search.Sort[] sorts)
           
 void checkLockout(com.liferay.portal.kernel.model.User user)
          Checks if the user is currently locked out based on the password policy, and performs maintenance on the user's lockout and failed login data.
 void checkLoginFailure(com.liferay.portal.kernel.model.User user)
          Adds a failed login attempt to the user and updates the user's last failed login date.
 void checkLoginFailureByEmailAddress(long companyId, String emailAddress)
          Adds a failed login attempt to the user with the email address and updates the user's last failed login date.
 void checkLoginFailureById(long userId)
          Adds a failed login attempt to the user and updates the user's last failed login date.
 void checkLoginFailureByScreenName(long companyId, String screenName)
          Adds a failed login attempt to the user with the screen name and updates the user's last failed login date.
 void checkPasswordExpired(com.liferay.portal.kernel.model.User user)
          Checks if the user's password is expired based on the password policy, and performs maintenance on the user's grace login and password reset data.
 void clearOrganizationUsers(long organizationId)
          Removes all the users from the organization.
 void clearUserGroupUsers(long userGroupId)
          Removes all the users from the user group.
 void completeUserRegistration(com.liferay.portal.kernel.model.User user, com.liferay.portal.kernel.service.ServiceContext serviceContext)
          Completes the user's registration by generating a password and sending the confirmation email.
 com.liferay.portal.kernel.util.KeyValuePair decryptUserId(long companyId, String name, String password)
          Decrypts the user's primary key and password from their encrypted forms.
 void deletePortrait(long userId)
          Deletes the user's portrait image.
 void deleteRoleUser(long roleId, long userId)
          Removes the user from the role.
 com.liferay.portal.kernel.model.User deleteUser(long userId)
          Deletes the user.
 com.liferay.portal.kernel.model.User deleteUser(com.liferay.portal.kernel.model.User user)
          Deletes the user.
 void deleteUserGroupUser(long userGroupId, long userId)
          Removes the user from the user group.
 String encryptUserId(String name)
          Encrypts the primary key of the user.
 com.liferay.portal.kernel.model.User fetchUserByContactId(long contactId)
          Returns the user with the contact ID.
 com.liferay.portal.kernel.model.User fetchUserByEmailAddress(long companyId, String emailAddress)
          Returns the user with the email address.
 com.liferay.portal.kernel.model.User fetchUserByFacebookId(long companyId, long facebookId)
          Returns the user with the Facebook ID.
 com.liferay.portal.kernel.model.User fetchUserByGoogleUserId(long companyId, String googleUserId)
          Returns the user with the Google user ID.
 com.liferay.portal.kernel.model.User fetchUserById(long userId)
          Returns the user with the primary key.
 com.liferay.portal.kernel.model.User fetchUserByOpenId(long companyId, String openId)
          Returns the user with the OpenID.
 com.liferay.portal.kernel.model.User fetchUserByPortraitId(long portraitId)
          Returns the user with the portrait ID.
 com.liferay.portal.kernel.model.User fetchUserByScreenName(long companyId, String screenName)
          Returns the user with the screen name.
protected  Date getBirthday(int birthdayMonth, int birthdayDay, int birthdayYear)
           
 List<com.liferay.portal.kernel.model.User> getCompanyUsers(long companyId, int start, int end)
          Returns a range of all the users belonging to the company.
 int getCompanyUsersCount(long companyId)
          Returns the number of users belonging to the company.
 com.liferay.portal.kernel.model.User getDefaultUser(long companyId)
          Returns the default user for the company.
 long getDefaultUserId(long companyId)
          Returns the primary key of the default user for the company.
 long[] getGroupUserIds(long groupId)
          Returns the primary keys of all the users belonging to the group.
 int getGroupUsersCount(long groupId, int status)
          Returns the number of users with the status belonging to the group.
 List<com.liferay.portal.kernel.model.User> getInheritedRoleUsers(long roleId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
           
protected  String getLogin(String login)
           
 List<com.liferay.portal.kernel.model.User> getNoAnnouncementsDeliveries(String type)
          Returns all the users who have not had any announcements of the type delivered, excluding the default user.
 List<com.liferay.portal.kernel.model.User> getNoContacts()
          Returns all the users who do not have any contacts.
 List<com.liferay.portal.kernel.model.User> getNoGroups()
          Returns all the users who do not belong to any groups, excluding the default user.
 long[] getOrganizationUserIds(long organizationId)
          Returns the primary keys of all the users belonging to the organization.
 int getOrganizationUsersCount(long organizationId, int status)
          Returns the number of users with the status belonging to the organization.
 long[] getRoleUserIds(long roleId)
          Returns the primary keys of all the users belonging to the role.
 int getRoleUsersCount(long roleId, int status)
          Returns the number of users with the status belonging to the role.
 List<com.liferay.portal.kernel.model.User> getSocialUsers(long userId, int socialRelationType, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
          Deprecated. As of 7.0.0, replaced by getSocialUsers(long, int, String, int, int, OrderByComparator)
 List<com.liferay.portal.kernel.model.User> getSocialUsers(long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
          Deprecated. As of 7.0.0, replaced by getSocialUsers(long, int, String, int, int, OrderByComparator)
 List<com.liferay.portal.kernel.model.User> getSocialUsers(long userId, int socialRelationType, String socialRelationTypeComparator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
           
 List<com.liferay.portal.kernel.model.User> getSocialUsers(long userId1, long userId2, int socialRelationType, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
          Returns an ordered range of all the users with a mutual social relation of the type with both of the given users.
 List<com.liferay.portal.kernel.model.User> getSocialUsers(long userId1, long userId2, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
          Returns an ordered range of all the users with a mutual social relation with both of the given users.
 int getSocialUsersCount(long userId)
          Deprecated. As of 7.0.0, replaced by getSocialUsersCount(long, int, String)
 int getSocialUsersCount(long userId, int socialRelationType)
          Deprecated. As of 7.0.0, replaced by getSocialUsersCount(long, int, String)
 int getSocialUsersCount(long userId, int socialRelationType, String socialRelationTypeComparator)
          Returns the number of users with a social relation with the user.
 int getSocialUsersCount(long userId1, long userId2)
          Returns the number of users with a mutual social relation with both of the given users.
 int getSocialUsersCount(long userId1, long userId2, int socialRelationType)
          Returns the number of users with a mutual social relation of the type with both of the given users.
protected  com.liferay.portal.kernel.search.Sort[] getSorts(com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
           
 com.liferay.portal.kernel.model.User getUserByContactId(long contactId)
          Returns the user with the contact ID.
 com.liferay.portal.kernel.model.User getUserByEmailAddress(long companyId, String emailAddress)
          Returns the user with the email address.
 com.liferay.portal.kernel.model.User getUserByFacebookId(long companyId, long facebookId)
          Returns the user with the Facebook ID.
 com.liferay.portal.kernel.model.User getUserByGoogleUserId(long companyId, String googleUserId)
          Returns the user with the Google user ID.
 com.liferay.portal.kernel.model.User getUserById(long userId)
          Returns the user with the primary key.
 com.liferay.portal.kernel.model.User getUserById(long companyId, long userId)
          Returns the user with the primary key from the company.
 com.liferay.portal.kernel.model.User getUserByOpenId(long companyId, String openId)
          Returns the user with the OpenID.
 com.liferay.portal.kernel.model.User getUserByPortraitId(long portraitId)
          Returns the user with the portrait ID.
 com.liferay.portal.kernel.model.User getUserByScreenName(long companyId, String screenName)
          Returns the user with the screen name.
 com.liferay.portal.kernel.model.User getUserByUuidAndCompanyId(String uuid, long companyId)
          Returns the user with the UUID.
 int getUserGroupUsersCount(long userGroupId, int status)
          Returns the number of users with the status belonging to the user group.
 long getUserIdByEmailAddress(long companyId, String emailAddress)
          Returns the primary key of the user with the email address.
 long getUserIdByScreenName(long companyId, String screenName)
          Returns the primary key of the user with the screen name.
protected  int handleAuthenticationFailure(String login, String authType, com.liferay.portal.kernel.model.User user, Map<String,String[]> headerMap, Map<String,String[]> parameterMap)
           
 boolean hasPasswordPolicyUser(long passwordPolicyId, long userId)
          Returns true if the password policy has been assigned to the user.
 boolean hasRoleUser(long companyId, String name, long userId, boolean inherited)
          Returns true if the user has the role with the name, optionally through inheritance.
 boolean isPasswordExpired(com.liferay.portal.kernel.model.User user)
          Returns true if the user's password is expired.
 boolean isPasswordExpiringSoon(com.liferay.portal.kernel.model.User user)
          Returns true if the password policy is configured to warn the user that his password is expiring and the remaining time until expiration is equal or less than the configured warning time.
protected  boolean isUseCustomSQL(LinkedHashMap<String,Object> params)
           
protected  boolean isUserAllowedToAuthenticate(com.liferay.portal.kernel.model.User user)
           
 com.liferay.portal.kernel.model.User loadGetDefaultUser(long companyId)
          Returns the default user for the company.
protected  void notifyUser(com.liferay.portal.kernel.model.User user, String password, com.liferay.portal.kernel.service.ServiceContext serviceContext)
           
protected  void reindex(long userId)
           
protected  void reindex(long[] userIds)
           
protected  void reindex(com.liferay.portal.kernel.model.User user)
           
protected  void resetFailedLoginAttempts(com.liferay.portal.kernel.model.User user)
           
protected  void resetFailedLoginAttempts(com.liferay.portal.kernel.model.User user, boolean forceUpdate)
           
 List<com.liferay.portal.kernel.model.User> search(long companyId, String keywords, int status, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
          Returns an ordered range of all the users who match the keywords and status, without using the indexer.
 com.liferay.portal.kernel.search.Hits search(long companyId, String keywords, int status, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.search.Sort sort)
          Returns an ordered range of all the users who match the keywords and status, using the indexer.
 com.liferay.portal.kernel.search.Hits search(long companyId, String keywords, int status, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.search.Sort[] sorts)
           
 List<com.liferay.portal.kernel.model.User> search(long companyId, String firstName, String middleName, String lastName, String screenName, String emailAddress, int status, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
          Returns an ordered range of all the users with the status, and whose first name, middle name, last name, screen name, and email address match the keywords specified for them, without using the indexer.
 com.liferay.portal.kernel.search.Hits search(long companyId, String firstName, String middleName, String lastName, String screenName, String emailAddress, int status, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, com.liferay.portal.kernel.search.Sort sort)
          Returns an ordered range of all the users with the status, and whose first name, middle name, last name, screen name, and email address match the keywords specified for them, using the indexer.
 com.liferay.portal.kernel.search.Hits search(long companyId, String firstName, String middleName, String lastName, String screenName, String emailAddress, int status, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, com.liferay.portal.kernel.search.Sort[] sorts)
           
 int searchCount(long companyId, String keywords, int status, LinkedHashMap<String,Object> params)
          Returns the number of users who match the keywords and status.
 int searchCount(long companyId, String firstName, String middleName, String lastName, String screenName, String emailAddress, int status, LinkedHashMap<String,Object> params, boolean andSearch)
          Returns the number of users with the status, and whose first name, middle name, last name, screen name, and email address match the keywords specified for them.
 Map<Long,Integer> searchCounts(long companyId, int status, long[] groupIds)
           
 List<com.liferay.portal.kernel.model.User> searchSocial(long[] groupIds, long userId, int[] socialRelationTypes, String keywords, int start, int end)
           
 List<com.liferay.portal.kernel.model.User> searchSocial(long userId, int[] socialRelationTypes, String keywords, int start, int end)
           
 List<com.liferay.portal.kernel.model.User> searchSocial(long companyId, long[] groupIds, String keywords, int start, int end)
           
 com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> searchUsers(long companyId, String keywords, int status, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.search.Sort sort)
           
 com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> searchUsers(long companyId, String keywords, int status, LinkedHashMap<String,Object> params, int start, int end, com.liferay.portal.kernel.search.Sort[] sorts)
           
 com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> searchUsers(long companyId, String firstName, String middleName, String lastName, String screenName, String emailAddress, int status, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, com.liferay.portal.kernel.search.Sort sort)
           
 com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> searchUsers(long companyId, String firstName, String middleName, String lastName, String screenName, String emailAddress, int status, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, com.liferay.portal.kernel.search.Sort[] sorts)
           
protected  com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> searchUsers(com.liferay.portal.kernel.search.SearchContext searchContext)
           
 void sendEmailAddressVerification(com.liferay.portal.kernel.model.User user, String emailAddress, com.liferay.portal.kernel.service.ServiceContext serviceContext)
          Sends an email address verification to the user.
 boolean sendPassword(long companyId, String emailAddress, String fromName, String fromAddress, String subject, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext)
          Sends the password email to the user with the email address.
 boolean sendPasswordByEmailAddress(long companyId, String emailAddress)
          Sends a password notification email to the user matching the email address.
 boolean sendPasswordByScreenName(long companyId, String screenName)
          Sends a password notification email to the user matching the screen name.
 boolean sendPasswordByUserId(long userId)
          Sends a password notification email to the user matching the ID.
protected  void sendPasswordNotification(com.liferay.portal.kernel.model.User user, long companyId, String newPassword, String passwordResetURL, String fromName, String fromAddress, String subject, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext)
           
protected  void setEmailAddress(com.liferay.portal.kernel.model.User user, String password, String firstName, String middleName, String lastName, String emailAddress)
           
 void setRoleUsers(long roleId, long[] userIds)
          Sets the users in the role, removing and adding users to the role as necessary.
 void setUserGroupUsers(long userGroupId, long[] userIds)
          Sets the users in the user group, removing and adding users to the user group as necessary.
 void unsetGroupTeamsUsers(long groupId, long[] userIds)
          Removes the users from the teams of a group.
 void unsetGroupUsers(long groupId, long[] userIds, com.liferay.portal.kernel.service.ServiceContext serviceContext)
          Removes the users from the group.
 void unsetOrganizationUsers(long organizationId, long[] userIds)
          Removes the users from the organization.
 void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
          Removes the users from the password policy.
 void unsetRoleUsers(long roleId, List<com.liferay.portal.kernel.model.User> users)
          Removes the users from the role.
 void unsetRoleUsers(long roleId, long[] userIds)
          Removes the users from the role.
 void unsetTeamUsers(long teamId, long[] userIds)
          Removes the users from the team.
 void unsetUserGroupUsers(long userGroupId, long[] userIds)
          Removes the users from the user group.
 com.liferay.portal.kernel.model.User updateAgreedToTermsOfUse(long userId, boolean agreedToTermsOfUse)
          Updates whether the user has agreed to the terms of use.
 void updateAsset(long userId, com.liferay.portal.kernel.model.User user, long[] assetCategoryIds, String[] assetTagNames)
          Updates the user's asset with the new asset categories and tag names, removing and adding asset categories and tag names as necessary.
 com.liferay.portal.kernel.model.User updateCreateDate(long userId, Date createDate)
          Updates the user's creation date.
 com.liferay.portal.kernel.model.User updateEmailAddress(long userId, String password, String emailAddress1, String emailAddress2)
          Updates the user's email address.
 com.liferay.portal.kernel.model.User updateEmailAddress(long userId, String password, String emailAddress1, String emailAddress2, com.liferay.portal.kernel.service.ServiceContext serviceContext)
          Updates the user's email address or sends verification email.
 com.liferay.portal.kernel.model.User updateEmailAddressVerified(long userId, boolean emailAddressVerified)
          Updates whether the user has verified email address.
 com.liferay.portal.kernel.model.User updateFacebookId(long userId, long facebookId)
          Updates the user's Facebook ID.
 com.liferay.portal.kernel.model.User updateGoogleUserId(long userId, String googleUserId)
          Updates the user's Google user ID.
 void updateGroups(long userId, long[] newGroupIds, com.liferay.portal.kernel.service.ServiceContext serviceContext)
          Sets the groups the user is in, removing and adding groups as necessary.
protected  void updateGroups(long userId, long[] newGroupIds, com.liferay.portal.kernel.service.ServiceContext serviceContext, boolean indexingEnabled)
           
 com.liferay.portal.kernel.model.User updateIncompleteUser(long creatorUserId, long companyId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, long facebookId, String openId, Locale locale, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String jobTitle, boolean updateUserInformation, boolean sendEmail, com.liferay.portal.kernel.service.ServiceContext serviceContext)
          Updates a user account that was automatically created when a guest user participated in an action (e.g. posting a comment) and only provided his name and email address.
 com.liferay.portal.kernel.model.User updateJobTitle(long userId, String jobTitle)
          Updates the user's job title.
 com.liferay.portal.kernel.model.User updateLastLogin(long userId, String loginIP)
          Updates the user's last login with the current time and the IP address.
 com.liferay.portal.kernel.model.User updateLockout(com.liferay.portal.kernel.model.User user, boolean lockout)
          Updates whether the user is locked out from logging in.
 com.liferay.portal.kernel.model.User updateLockoutByEmailAddress(long companyId, String emailAddress, boolean lockout)
          Updates whether the user is locked out from logging in.
 com.liferay.portal.kernel.model.User updateLockoutById(long userId, boolean lockout)
          Updates whether the user is locked out from logging in.
 com.liferay.portal.kernel.model.User updateLockoutByScreenName(long companyId, String screenName, boolean lockout)
          Updates whether the user is locked out from logging in.
 com.liferay.portal.kernel.model.User updateModifiedDate(long userId, Date modifiedDate)
          Updates the user's modified date.
 com.liferay.portal.kernel.model.User updateOpenId(long userId, String openId)
          Updates the user's OpenID.
protected  void updateOrganizations(long userId, long[] newOrganizationIds, boolean indexingEnabled)
           
 void updateOrganizations(long userId, long[] newOrganizationIds, com.liferay.portal.kernel.service.ServiceContext serviceContext)
          Sets the organizations that the user is in, removing and adding organizations as necessary.
 com.liferay.portal.kernel.model.User updatePassword(long userId, String password1, String password2, boolean passwordReset)
          Updates the user's password without tracking or validation of the change.
 com.liferay.portal.kernel.model.User updatePassword(long userId, String password1, String password2, boolean passwordReset, boolean silentUpdate)
          Updates the user's password, optionally with tracking and validation of the change.
 com.liferay.portal.kernel.model.User updatePasswordManually(long userId, String password, boolean passwordEncrypted, boolean passwordReset, Date passwordModifiedDate)
          Updates the user's password with manually input information.
 com.liferay.portal.kernel.model.User updatePasswordReset(long userId, boolean passwordReset)
          Updates whether the user should be asked to reset their password the next time they login.
 com.liferay.portal.kernel.model.User updatePortrait(long userId, byte[] bytes)
          Updates the user's portrait image.
 com.liferay.portal.kernel.model.User updateReminderQuery(long userId, String question, String answer)
          Updates the user's password reset question and answer.
 com.liferay.portal.kernel.model.User updateScreenName(long userId, String screenName)
          Updates the user's screen name.
 com.liferay.portal.kernel.model.User updateStatus(long userId, int status)
          Deprecated. As of 7.0.0, replaced by updateStatus(long, int, ServiceContext)
 com.liferay.portal.kernel.model.User updateStatus(long userId, int status, com.liferay.portal.kernel.service.ServiceContext serviceContext)
          Updates the user's workflow status.
 com.liferay.portal.kernel.model.User updateUser(long userId, String oldPassword, String newPassword1, String newPassword2, boolean passwordReset, String reminderQueryQuestion, String reminderQueryAnswer, String screenName, String emailAddress, long facebookId, String openId, boolean portrait, byte[] portraitBytes, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String facebookSn, String jabberSn, String skypeSn, String twitterSn, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, List<com.liferay.portal.kernel.model.UserGroupRole> userGroupRoles, long[] userGroupIds, com.liferay.portal.kernel.service.ServiceContext serviceContext)
          Updates the user.
 com.liferay.portal.kernel.model.User updateUser(long userId, String oldPassword, String newPassword1, String newPassword2, boolean passwordReset, String reminderQueryQuestion, String reminderQueryAnswer, String screenName, String emailAddress, long facebookId, String openId, String languageId, String timeZoneId, String greeting, String comments, String firstName, String middleName, String lastName, long prefixId, long suffixId, boolean male, int birthdayMonth, int birthdayDay, int birthdayYear, String smsSn, String facebookSn, String jabberSn, String skypeSn, String twitterSn, String jobTitle, long[] groupIds, long[] organizationIds, long[] roleIds, List<com.liferay.portal.kernel.model.UserGroupRole> userGroupRoles, long[] userGroupIds, com.liferay.portal.kernel.service.ServiceContext serviceContext)
          Deprecated. As of 7.0.0, replaced by updateUser(long, String, String, String, boolean, String, String, String, String, long, String, boolean, byte[], String, String, String, String, String, String, String, long, long, boolean, int, int, int, String, String, String, String, String, String, long[], long[], long[], List, long[], ServiceContext)
protected  void updateUserGroupRoles(com.liferay.portal.kernel.model.User user, long[] groupIds, long[] organizationIds, List<com.liferay.portal.kernel.model.UserGroupRole> userGroupRoles, List<com.liferay.portal.kernel.model.UserGroupRole> previousUserGroupRoles)
           
protected  void validate(long companyId, long userId, boolean autoPassword, String password1, String password2, boolean autoScreenName, String screenName, String emailAddress, String openId, String firstName, String middleName, String lastName, long[] organizationIds, Locale locale)
           
protected  void validate(long userId, String screenName, String emailAddress, String openId, String firstName, String middleName, String lastName, String smsSn, Locale locale)
           
protected  void validateCompanyMaxUsers(long companyId)
           
protected  void validateEmailAddress(long companyId, String emailAddress)
           
protected  void validateEmailAddress(com.liferay.portal.kernel.model.User user, String emailAddress1, String emailAddress2)
           
protected  void validateFullName(long companyId, String firstName, String middleName, String lastName, Locale locale)
           
protected  void validateGoogleUserId(long companyId, long userId, String googleUserId)
           
protected  void validateOpenId(long companyId, long userId, String openId)
           
protected  void validatePassword(long companyId, long userId, String password1, String password2)
           
protected  void validateReminderQuery(String question, String answer)
           
protected  void validateScreenName(long companyId, long userId, String screenName)
           
 void verifyEmailAddress(String ticketKey)
          Verifies the email address of the ticket.
 
Methods inherited from class com.liferay.portal.service.base.UserLocalServiceBaseImpl
addGroupUser, addGroupUser, addGroupUsers, addOrganizationUser, addOrganizationUser, addOrganizationUsers, addRoleUser, addRoleUser, addRoleUsers, addTeamUser, addTeamUser, addTeamUsers, addUser, addUserGroupUser, addUserGroupUser, addUserGroupUsers, clearGroupUsers, clearRoleUsers, clearTeamUsers, createUser, deleteGroupUser, deleteGroupUser, deleteGroupUsers, deleteGroupUsers, deleteOrganizationUser, deleteOrganizationUser, deleteOrganizationUsers, deleteOrganizationUsers, deletePersistedModel, deleteRoleUser, deleteRoleUsers, deleteRoleUsers, deleteTeamUser, deleteTeamUser, deleteTeamUsers, deleteTeamUsers, deleteUserGroupUser, deleteUserGroupUsers, deleteUserGroupUsers, destroy, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQueryCount, dynamicQueryCount, fetchUser, fetchUserByUuidAndCompanyId, getActionableDynamicQuery, getAnnouncementsDeliveryLocalService, getAnnouncementsDeliveryPersistence, getAssetEntryFinder, getAssetEntryLocalService, getAssetEntryPersistence, getBlogsStatsUserFinder, getBlogsStatsUserLocalService, getBlogsStatsUserPersistence, getBrowserTrackerLocalService, getBrowserTrackerPersistence, getCompanyLocalService, getCompanyPersistence, getContactLocalService, getContactPersistence, getCounterLocalService, getDLFileEntryFinder, getDLFileEntryLocalService, getDLFileEntryPersistence, getDLFileRankFinder, getDLFileRankLocalService, getDLFileRankPersistence, getExpandoRowLocalService, getExpandoRowPersistence, getExportActionableDynamicQuery, getGroupFinder, getGroupLocalService, getGroupPersistence, getGroupPrimaryKeys, getGroupUsers, getGroupUsers, getGroupUsers, getGroupUsersCount, getImageLocalService, getImagePersistence, getIndexableActionableDynamicQuery, getLayoutFinder, getLayoutLocalService, getLayoutPersistence, getMBBanLocalService, getMBBanPersistence, getMBMessageFinder, getMBMessageLocalService, getMBMessagePersistence, getMBStatsUserLocalService, getMBStatsUserPersistence, getMBThreadFlagLocalService, getMBThreadFlagPersistence, getMembershipRequestLocalService, getMembershipRequestPersistence, getModelClass, getModelClassName, getOrganizationFinder, getOrganizationLocalService, getOrganizationPersistence, getOrganizationPrimaryKeys, getOrganizationUsers, getOrganizationUsers, getOrganizationUsers, getOrganizationUsersCount, getOSGiServiceIdentifier, getPasswordPolicyFinder, getPasswordPolicyLocalService, getPasswordPolicyPersistence, getPasswordPolicyRelLocalService, getPasswordPolicyRelPersistence, getPasswordTrackerLocalService, getPasswordTrackerPersistence, getPersistedModel, getRatingsStatsFinder, getRatingsStatsLocalService, getRatingsStatsPersistence, getRecentLayoutBranchLocalService, getRecentLayoutBranchPersistence, getRecentLayoutRevisionLocalService, getRecentLayoutRevisionPersistence, getRecentLayoutSetBranchLocalService, getRecentLayoutSetBranchPersistence, getResourceLocalService, getRoleFinder, getRoleLocalService, getRolePersistence, getRolePrimaryKeys, getRoleUsers, getRoleUsers, getRoleUsers, getRoleUsersCount, getSocialActivityFinder, getSocialActivityLocalService, getSocialActivityPersistence, getSocialRelationLocalService, getSocialRelationPersistence, getSocialRequestLocalService, getSocialRequestPersistence, getSubscriptionLocalService, getSubscriptionPersistence, getTeamFinder, getTeamLocalService, getTeamPersistence, getTeamPrimaryKeys, getTeamUsers, getTeamUsers, getTeamUsers, getTeamUsersCount, getTicketLocalService, getTicketPersistence, getUser, getUserFinder, getUserGroupFinder, getUserGroupLocalService, getUserGroupPersistence, getUserGroupPrimaryKeys, getUserGroupRoleFinder, getUserGroupRoleLocalService, getUserGroupRolePersistence, getUserGroupUsers, getUserGroupUsers, getUserGroupUsers, getUserGroupUsersCount, getUserIdMapperLocalService, getUserIdMapperPersistence, getUserLocalService, getUserPersistence, getUsers, getUsersCount, getWorkflowInstanceLinkLocalService, getWorkflowInstanceLinkPersistence, hasGroupUser, hasGroupUsers, hasOrganizationUser, hasOrganizationUsers, hasRoleUser, hasRoleUsers, hasTeamUser, hasTeamUsers, hasUserGroupUser, hasUserGroupUsers, initActionableDynamicQuery, runSQL, setAnnouncementsDeliveryLocalService, setAnnouncementsDeliveryPersistence, setAssetEntryFinder, setAssetEntryLocalService, setAssetEntryPersistence, setBlogsStatsUserFinder, setBlogsStatsUserLocalService, setBlogsStatsUserPersistence, setBrowserTrackerLocalService, setBrowserTrackerPersistence, setCompanyLocalService, setCompanyPersistence, setContactLocalService, setContactPersistence, setCounterLocalService, setDLFileEntryFinder, setDLFileEntryLocalService, setDLFileEntryPersistence, setDLFileRankFinder, setDLFileRankLocalService, setDLFileRankPersistence, setExpandoRowLocalService, setExpandoRowPersistence, setGroupFinder, setGroupLocalService, setGroupPersistence, setGroupUsers, setImageLocalService, setImagePersistence, setLayoutFinder, setLayoutLocalService, setLayoutPersistence, setMBBanLocalService, setMBBanPersistence, setMBMessageFinder, setMBMessageLocalService, setMBMessagePersistence, setMBStatsUserLocalService, setMBStatsUserPersistence, setMBThreadFlagLocalService, setMBThreadFlagPersistence, setMembershipRequestLocalService, setMembershipRequestPersistence, setOrganizationFinder, setOrganizationLocalService, setOrganizationPersistence, setOrganizationUsers, setPasswordPolicyFinder, setPasswordPolicyLocalService, setPasswordPolicyPersistence, setPasswordPolicyRelLocalService, setPasswordPolicyRelPersistence, setPasswordTrackerLocalService, setPasswordTrackerPersistence, setRatingsStatsFinder, setRatingsStatsLocalService, setRatingsStatsPersistence, setRecentLayoutBranchLocalService, setRecentLayoutBranchPersistence, setRecentLayoutRevisionLocalService, setRecentLayoutRevisionPersistence, setRecentLayoutSetBranchLocalService, setRecentLayoutSetBranchPersistence, setResourceLocalService, setRoleFinder, setRoleLocalService, setRolePersistence, setSocialActivityFinder, setSocialActivityLocalService, setSocialActivityPersistence, setSocialRelationLocalService, setSocialRelationPersistence, setSocialRequestLocalService, setSocialRequestPersistence, setSubscriptionLocalService, setSubscriptionPersistence, setTeamFinder, setTeamLocalService, setTeamPersistence, setTeamUsers, setTicketLocalService, setTicketPersistence, setUserFinder, setUserGroupFinder, setUserGroupLocalService, setUserGroupPersistence, setUserGroupRoleFinder, setUserGroupRoleLocalService, setUserGroupRolePersistence, setUserIdMapperLocalService, setUserIdMapperPersistence, setUserLocalService, setUserPersistence, setWorkflowInstanceLinkLocalService, setWorkflowInstanceLinkPersistence, updateUser
 
Methods inherited from class com.liferay.portal.kernel.service.BaseLocalServiceImpl
getClassLoader, getLocalizationMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mailService

@BeanReference(type=com.liferay.mail.kernel.service.MailService.class)
protected com.liferay.mail.kernel.service.MailService mailService
Constructor Detail

UserLocalServiceImpl

public UserLocalServiceImpl()
Method Detail

addDefaultAdminUser

public com.liferay.portal.kernel.model.User addDefaultAdminUser(long companyId,
                                                                String screenName,
                                                                String emailAddress,
                                                                Locale locale,
                                                                String firstName,
                                                                String middleName,
                                                                String lastName)
                                                         throws com.liferay.portal.kernel.exception.PortalException
Adds a default admin user for the company.

Parameters:
companyId - the primary key of the user's company
screenName - the user's screen name
emailAddress - the user's email address
locale - the user's locale
firstName - the user's first name
middleName - the user's middle name
lastName - the user's last name
Returns:
the new default admin user
Throws:
com.liferay.portal.kernel.exception.PortalException

addDefaultGroups

public void addDefaultGroups(long userId)
                      throws com.liferay.portal.kernel.exception.PortalException
Adds the user to the default groups, unless the user is already in these groups. The default groups can be specified in portal.properties with the key admin.default.group.names.

Parameters:
userId - the primary key of the user
Throws:
com.liferay.portal.kernel.exception.PortalException

addDefaultRoles

public void addDefaultRoles(long userId)
                     throws com.liferay.portal.kernel.exception.PortalException
Adds the user to the default regular roles, unless the user already has these regular roles. The default regular roles can be specified in portal.properties with the key admin.default.role.names.

Parameters:
userId - the primary key of the user
Throws:
com.liferay.portal.kernel.exception.PortalException

addDefaultUserGroups

public void addDefaultUserGroups(long userId)
                          throws com.liferay.portal.kernel.exception.PortalException
Adds the user to the default user groups, unless the user is already in these user groups. The default user groups can be specified in portal.properties with the property admin.default.user.group.names.

Parameters:
userId - the primary key of the user
Throws:
com.liferay.portal.kernel.exception.PortalException

addGroupUsers

public void addGroupUsers(long groupId,
                          long[] userIds)
                   throws com.liferay.portal.kernel.exception.PortalException
Adds the users to the group.

Specified by:
addGroupUsers in interface com.liferay.portal.kernel.service.UserLocalService
Overrides:
addGroupUsers in class UserLocalServiceBaseImpl
Parameters:
groupId - the primary key of the group
userIds - the primary keys of the users
Throws:
com.liferay.portal.kernel.exception.PortalException

addOrganizationUsers

public void addOrganizationUsers(long organizationId,
                                 long[] userIds)
                          throws com.liferay.portal.kernel.exception.PortalException
Adds the users to the organization.

Specified by:
addOrganizationUsers in interface com.liferay.portal.kernel.service.UserLocalService
Overrides:
addOrganizationUsers in class UserLocalServiceBaseImpl
Parameters:
organizationId - the primary key of the organization
userIds - the primary keys of the users
Throws:
com.liferay.portal.kernel.exception.PortalException

addPasswordPolicyUsers

public void addPasswordPolicyUsers(long passwordPolicyId,
                                   long[] userIds)
Assigns the password policy to the users, removing any other currently assigned password policies.

Parameters:
passwordPolicyId - the primary key of the password policy
userIds - the primary keys of the users

addRoleUsers

public void addRoleUsers(long roleId,
                         long[] userIds)
                  throws com.liferay.portal.kernel.exception.PortalException
Adds the users to the role.

Specified by:
addRoleUsers in interface com.liferay.portal.kernel.service.UserLocalService
Overrides:
addRoleUsers in class UserLocalServiceBaseImpl
Parameters:
roleId - the primary key of the role
userIds - the primary keys of the users
Throws:
com.liferay.portal.kernel.exception.PortalException

addTeamUsers

public void addTeamUsers(long teamId,
                         long[] userIds)
                  throws com.liferay.portal.kernel.exception.PortalException
Adds the users to the team.

Specified by:
addTeamUsers in interface com.liferay.portal.kernel.service.UserLocalService
Overrides:
addTeamUsers in class UserLocalServiceBaseImpl
Parameters:
teamId - the primary key of the team
userIds - the primary keys of the users
Throws:
com.liferay.portal.kernel.exception.PortalException

addUser

public com.liferay.portal.kernel.model.User addUser(long creatorUserId,
                                                    long companyId,
                                                    boolean autoPassword,
                                                    String password1,
                                                    String password2,
                                                    boolean autoScreenName,
                                                    String screenName,
                                                    String emailAddress,
                                                    long facebookId,
                                                    String openId,
                                                    Locale locale,
                                                    String firstName,
                                                    String middleName,
                                                    String lastName,
                                                    long prefixId,
                                                    long suffixId,
                                                    boolean male,
                                                    int birthdayMonth,
                                                    int birthdayDay,
                                                    int birthdayYear,
                                                    String jobTitle,
                                                    long[] groupIds,
                                                    long[] organizationIds,
                                                    long[] roleIds,
                                                    long[] userGroupIds,
                                                    boolean sendEmail,
                                                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
                                             throws com.liferay.portal.kernel.exception.PortalException
Adds a user.

This method handles the creation and bookkeeping of the user including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, etc.

Parameters:
creatorUserId - the primary key of the creator
companyId - the primary key of the user's company
autoPassword - whether a password should be automatically generated for the user
password1 - the user's password
password2 - the user's password confirmation
autoScreenName - whether a screen name should be automatically generated for the user
screenName - the user's screen name
emailAddress - the user's email address
facebookId - the user's facebook ID
openId - the user's OpenID
locale - the user's locale
firstName - the user's first name
middleName - the user's middle name
lastName - the user's last name
prefixId - the user's name prefix ID
suffixId - the user's name suffix ID
male - whether the user is male
birthdayMonth - the user's birthday month (0-based, meaning 0 for January)
birthdayDay - the user's birthday day
birthdayYear - the user's birthday year
jobTitle - the user's job title
groupIds - the primary keys of the user's groups
organizationIds - the primary keys of the user's organizations
roleIds - the primary keys of the roles this user possesses
userGroupIds - the primary keys of the user's user groups
sendEmail - whether to send the user an email notification about their new account
serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
Returns:
the new user
Throws:
com.liferay.portal.kernel.exception.PortalException

addUserGroupUsers

public void addUserGroupUsers(long userGroupId,
                              long[] userIds)
                       throws com.liferay.portal.kernel.exception.PortalException
Adds the users to the user group.

Specified by:
addUserGroupUsers in interface com.liferay.portal.kernel.service.UserLocalService
Overrides:
addUserGroupUsers in class UserLocalServiceBaseImpl
Parameters:
userGroupId - the primary key of the user group
userIds - the primary keys of the users
Throws:
com.liferay.portal.kernel.exception.PortalException

addUserWithWorkflow

public com.liferay.portal.kernel.model.User addUserWithWorkflow(long creatorUserId,
                                                                long companyId,
                                                                boolean autoPassword,
                                                                String password1,
                                                                String password2,
                                                                boolean autoScreenName,
                                                                String screenName,
                                                                String emailAddress,
                                                                long facebookId,
                                                                String openId,
                                                                Locale locale,
                                                                String firstName,
                                                                String middleName,
                                                                String lastName,
                                                                long prefixId,
                                                                long suffixId,
                                                                boolean male,
                                                                int birthdayMonth,
                                                                int birthdayDay,
                                                                int birthdayYear,
                                                                String jobTitle,
                                                                long[] groupIds,
                                                                long[] organizationIds,
                                                                long[] roleIds,
                                                                long[] userGroupIds,
                                                                boolean sendEmail,
                                                                com.liferay.portal.kernel.service.ServiceContext serviceContext)
                                                         throws com.liferay.portal.kernel.exception.PortalException
Adds a user with workflow.

This method handles the creation and bookkeeping of the user including its resources, metadata, and internal data structures. It is not necessary to make subsequent calls to any methods to setup default groups, resources, etc.

Parameters:
creatorUserId - the primary key of the creator
companyId - the primary key of the user's company
autoPassword - whether a password should be automatically generated for the user
password1 - the user's password
password2 - the user's password confirmation
autoScreenName - whether a screen name should be automatically generated for the user
screenName - the user's screen name
emailAddress - the user's email address
facebookId - the user's facebook ID
openId - the user's OpenID
locale - the user's locale
firstName - the user's first name
middleName - the user's middle name
lastName - the user's last name
prefixId - the user's name prefix ID
suffixId - the user's name suffix ID
male - whether the user is male
birthdayMonth - the user's birthday month (0-based, meaning 0 for January)
birthdayDay - the user's birthday day
birthdayYear - the user's birthday year
jobTitle - the user's job title
groupIds - the primary keys of the user's groups
organizationIds - the primary keys of the user's organizations
roleIds - the primary keys of the roles this user possesses
userGroupIds - the primary keys of the user's user groups
sendEmail - whether to send the user an email notification about their new account
serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
Returns:
the new user
Throws:
com.liferay.portal.kernel.exception.PortalException

afterPropertiesSet

public void afterPropertiesSet()
Overrides:
afterPropertiesSet in class UserLocalServiceBaseImpl

authenticateByEmailAddress

public int authenticateByEmailAddress(long companyId,
                                      String emailAddress,
                                      String password,
                                      Map<String,String[]> headerMap,
                                      Map<String,String[]> parameterMap,
                                      Map<String,Object> resultsMap)
                               throws com.liferay.portal.kernel.exception.PortalException
Attempts to authenticate the user by their email address and password, while using the AuthPipeline.

Parameters:
companyId - the primary key of the user's company
emailAddress - the user's email address
password - the user's password
headerMap - the header map from the authentication request
parameterMap - the parameter map from the authentication request
resultsMap - the map of authentication results (may be nil). After a successful authentication the user's primary key will be placed under the key userId.
Returns:
the authentication status. This can be Authenticator.FAILURE indicating that the user's credentials are invalid, Authenticator.SUCCESS indicating a successful login, or Authenticator.DNE indicating that a user with that login does not exist.
Throws:
com.liferay.portal.kernel.exception.PortalException
See Also:
AuthPipeline

authenticateByScreenName

public int authenticateByScreenName(long companyId,
                                    String screenName,
                                    String password,
                                    Map<String,String[]> headerMap,
                                    Map<String,String[]> parameterMap,
                                    Map<String,Object> resultsMap)
                             throws com.liferay.portal.kernel.exception.PortalException
Attempts to authenticate the user by their screen name and password, while using the AuthPipeline.

Parameters:
companyId - the primary key of the user's company
screenName - the user's screen name
password - the user's password
headerMap - the header map from the authentication request
parameterMap - the parameter map from the authentication request
resultsMap - the map of authentication results (may be nil). After a successful authentication the user's primary key will be placed under the key userId.
Returns:
the authentication status. This can be Authenticator.FAILURE indicating that the user's credentials are invalid, Authenticator.SUCCESS indicating a successful login, or Authenticator.DNE indicating that a user with that login does not exist.
Throws:
com.liferay.portal.kernel.exception.PortalException
See Also:
AuthPipeline

authenticateByUserId

public int authenticateByUserId(long companyId,
                                long userId,
                                String password,
                                Map<String,String[]> headerMap,
                                Map<String,String[]> parameterMap,
                                Map<String,Object> resultsMap)
                         throws com.liferay.portal.kernel.exception.PortalException
Attempts to authenticate the user by their primary key and password, while using the AuthPipeline.

Parameters:
companyId - the primary key of the user's company
userId - the user's primary key
password - the user's password
headerMap - the header map from the authentication request
parameterMap - the parameter map from the authentication request
resultsMap - the map of authentication results (may be nil). After a successful authentication the user's primary key will be placed under the key userId.
Returns:
the authentication status. This can be Authenticator.FAILURE indicating that the user's credentials are invalid, Authenticator.SUCCESS indicating a successful login, or Authenticator.DNE indicating that a user with that login does not exist.
Throws:
com.liferay.portal.kernel.exception.PortalException
See Also:
AuthPipeline

authenticateForBasic

@Transactional(propagation=SUPPORTS)
public long authenticateForBasic(long companyId,
                                               String authType,
                                               String login,
                                               String password)
                          throws com.liferay.portal.kernel.exception.PortalException
Attempts to authenticate the user using HTTP basic access authentication, without using the AuthPipeline. Primarily used for authenticating users of tunnel-web.

Authentication type specifies what login contains.The valid values are:

Parameters:
companyId - the primary key of the user's company
authType - the type of authentication to perform
login - either the user's email address, screen name, or primary key depending on the value of authType
password - the user's password
Returns:
the user's primary key if authentication is successful; 0 otherwise
Throws:
com.liferay.portal.kernel.exception.PortalException

authenticateForDigest

@Transactional(propagation=SUPPORTS)
public long authenticateForDigest(long companyId,
                                                String username,
                                                String realm,
                                                String nonce,
                                                String method,
                                                String uri,
                                                String response)
                           throws com.liferay.portal.kernel.exception.PortalException
Attempts to authenticate the user using HTTP digest access authentication, without using the AuthPipeline. Primarily used for authenticating users of tunnel-web.

Parameters:
companyId - the primary key of the user's company
username - either the user's email address, screen name, or primary key
realm - unused
nonce - the number used once
method - the request method
uri - the request URI
response - the authentication response hash
Returns:
the user's primary key if authentication is successful; 0 otherwise
Throws:
com.liferay.portal.kernel.exception.PortalException

authenticateForJAAS

@Transactional(propagation=SUPPORTS,
               readOnly=true)
public boolean authenticateForJAAS(long userId,
                                                 String encPassword)
Attempts to authenticate the user using JAAS credentials, without using the AuthPipeline.

Parameters:
userId - the primary key of the user
encPassword - the encrypted password
Returns:
true if authentication is successful; false otherwise

checkLockout

public void checkLockout(com.liferay.portal.kernel.model.User user)
                  throws com.liferay.portal.kernel.exception.PortalException
Checks if the user is currently locked out based on the password policy, and performs maintenance on the user's lockout and failed login data.

Parameters:
user - the user
Throws:
com.liferay.portal.kernel.exception.PortalException

checkLoginFailure

public void checkLoginFailure(com.liferay.portal.kernel.model.User user)
Adds a failed login attempt to the user and updates the user's last failed login date.

Parameters:
user - the user

checkLoginFailureByEmailAddress

public void checkLoginFailureByEmailAddress(long companyId,
                                            String emailAddress)
                                     throws com.liferay.portal.kernel.exception.PortalException
Adds a failed login attempt to the user with the email address and updates the user's last failed login date.

Parameters:
companyId - the primary key of the user's company
emailAddress - the user's email address
Throws:
com.liferay.portal.kernel.exception.PortalException

checkLoginFailureById

public void checkLoginFailureById(long userId)
                           throws com.liferay.portal.kernel.exception.PortalException
Adds a failed login attempt to the user and updates the user's last failed login date.

Parameters:
userId - the primary key of the user
Throws:
com.liferay.portal.kernel.exception.PortalException

checkLoginFailureByScreenName

public void checkLoginFailureByScreenName(long companyId,
                                          String screenName)
                                   throws com.liferay.portal.kernel.exception.PortalException
Adds a failed login attempt to the user with the screen name and updates the user's last failed login date.

Parameters:
companyId - the primary key of the user's company
screenName - the user's screen name
Throws:
com.liferay.portal.kernel.exception.PortalException

checkPasswordExpired

public void checkPasswordExpired(com.liferay.portal.kernel.model.User user)
                          throws com.liferay.portal.kernel.exception.PortalException
Checks if the user's password is expired based on the password policy, and performs maintenance on the user's grace login and password reset data.

Parameters:
user - the user
Throws:
com.liferay.portal.kernel.exception.PortalException

clearOrganizationUsers

public void clearOrganizationUsers(long organizationId)
Removes all the users from the organization.

Specified by:
clearOrganizationUsers in interface com.liferay.portal.kernel.service.UserLocalService
Overrides:
clearOrganizationUsers in class UserLocalServiceBaseImpl
Parameters:
organizationId - the primary key of the organization

clearUserGroupUsers

public void clearUserGroupUsers(long userGroupId)
Removes all the users from the user group.

Specified by:
clearUserGroupUsers in interface com.liferay.portal.kernel.service.UserLocalService
Overrides:
clearUserGroupUsers in class UserLocalServiceBaseImpl
Parameters:
userGroupId - the primary key of the user group

completeUserRegistration

public void completeUserRegistration(com.liferay.portal.kernel.model.User user,
                                     com.liferay.portal.kernel.service.ServiceContext serviceContext)
                              throws com.liferay.portal.kernel.exception.PortalException
Completes the user's registration by generating a password and sending the confirmation email.

Parameters:
user - the user
serviceContext - the service context to be applied. You can specify an unencrypted custom password for the user via attribute passwordUnencrypted. You automatically generate a password for the user by setting attribute autoPassword to true. You can send a confirmation email to the user by setting attribute sendEmail to true.
Throws:
com.liferay.portal.kernel.exception.PortalException

decryptUserId

public com.liferay.portal.kernel.util.KeyValuePair decryptUserId(long companyId,
                                                                 String name,
                                                                 String password)
                                                          throws com.liferay.portal.kernel.exception.PortalException
Decrypts the user's primary key and password from their encrypted forms. Used for decrypting a user's credentials from the values stored in an automatic login cookie.

Parameters:
companyId - the primary key of the user's company
name - the encrypted primary key of the user
password - the encrypted password of the user
Returns:
the user's primary key and password
Throws:
com.liferay.portal.kernel.exception.PortalException

deletePortrait

public void deletePortrait(long userId)
                    throws com.liferay.portal.kernel.exception.PortalException
Deletes the user's portrait image.

Parameters:
userId - the primary key of the user
Throws:
com.liferay.portal.kernel.exception.PortalException

deleteRoleUser

public void deleteRoleUser(long roleId,
                           long userId)
                    throws com.liferay.portal.kernel.exception.PortalException
Removes the user from the role.

Specified by:
deleteRoleUser in interface com.liferay.portal.kernel.service.UserLocalService
Overrides:
deleteRoleUser in class UserLocalServiceBaseImpl
Parameters:
roleId - the primary key of the role
userId - the primary key of the user
Throws:
com.liferay.portal.kernel.exception.PortalException

deleteUser

public com.liferay.portal.kernel.model.User deleteUser(long userId)
                                                throws com.liferay.portal.kernel.exception.PortalException
Deletes the user.

Specified by:
deleteUser in interface com.liferay.portal.kernel.service.UserLocalService
Overrides:
deleteUser in class UserLocalServiceBaseImpl
Parameters:
userId - the primary key of the user
Returns:
the deleted user
Throws:
com.liferay.portal.kernel.exception.PortalException - if a user with the primary key could not be found

deleteUser

public com.liferay.portal.kernel.model.User deleteUser(com.liferay.portal.kernel.model.User user)
                                                throws com.liferay.portal.kernel.exception.PortalException
Deletes the user.

Specified by:
deleteUser in interface com.liferay.portal.kernel.service.UserLocalService
Overrides:
deleteUser in class UserLocalServiceBaseImpl
Parameters:
user - the user
Returns:
the deleted user
Throws:
com.liferay.portal.kernel.exception.PortalException

deleteUserGroupUser

public void deleteUserGroupUser(long userGroupId,
                                long userId)
                         throws com.liferay.portal.kernel.exception.PortalException
Removes the user from the user group.

Specified by:
deleteUserGroupUser in interface com.liferay.portal.kernel.service.UserLocalService
Overrides:
deleteUserGroupUser in class UserLocalServiceBaseImpl
Parameters:
userGroupId - the primary key of the user group
userId - the primary key of the user
Throws:
com.liferay.portal.kernel.exception.PortalException

encryptUserId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
public String encryptUserId(String name)
                     throws com.liferay.portal.kernel.exception.PortalException
Encrypts the primary key of the user. Used when encrypting the user's credentials for storage in an automatic login cookie.

Parameters:
name - the primary key of the user
Returns:
the user's encrypted primary key
Throws:
com.liferay.portal.kernel.exception.PortalException

fetchUserByContactId

public com.liferay.portal.kernel.model.User fetchUserByContactId(long contactId)
Returns the user with the contact ID.

Parameters:
contactId - the user's contact ID
Returns:
the user with the contact ID, or null if a user with the contact ID could not be found

fetchUserByEmailAddress

public com.liferay.portal.kernel.model.User fetchUserByEmailAddress(long companyId,
                                                                    String emailAddress)
Returns the user with the email address.

Parameters:
companyId - the primary key of the user's company
emailAddress - the user's email address
Returns:
the user with the email address, or null if a user with the email address could not be found

fetchUserByFacebookId

public com.liferay.portal.kernel.model.User fetchUserByFacebookId(long companyId,
                                                                  long facebookId)
Returns the user with the Facebook ID.

Parameters:
companyId - the primary key of the user's company
facebookId - the user's Facebook ID
Returns:
the user with the Facebook ID, or null if a user with the Facebook ID could not be found

fetchUserByGoogleUserId

public com.liferay.portal.kernel.model.User fetchUserByGoogleUserId(long companyId,
                                                                    String googleUserId)
Returns the user with the Google user ID.

Parameters:
companyId - the primary key of the user's company
googleUserId - the user's Google user ID
Returns:
the user with the Google user ID, or null if a user with the Google user ID could not be found

fetchUserById

public com.liferay.portal.kernel.model.User fetchUserById(long userId)
Returns the user with the primary key.

Parameters:
userId - the primary key of the user
Returns:
the user with the primary key, or null if a user with the primary key could not be found

fetchUserByOpenId

public com.liferay.portal.kernel.model.User fetchUserByOpenId(long companyId,
                                                              String openId)
Returns the user with the OpenID.

Parameters:
companyId - the primary key of the user's company
openId - the user's OpenID
Returns:
the user with the OpenID, or null if a user with the OpenID could not be found

fetchUserByPortraitId

public com.liferay.portal.kernel.model.User fetchUserByPortraitId(long portraitId)
Returns the user with the portrait ID.

Parameters:
portraitId - the user's portrait ID
Returns:
the user with the portrait ID, or null if a user with the portrait ID could not be found

fetchUserByScreenName

public com.liferay.portal.kernel.model.User fetchUserByScreenName(long companyId,
                                                                  String screenName)
Returns the user with the screen name.

Parameters:
companyId - the primary key of the user's company
screenName - the user's screen name
Returns:
the user with the screen name, or null if a user with the screen name could not be found

getCompanyUsers

public List<com.liferay.portal.kernel.model.User> getCompanyUsers(long companyId,
                                                                  int start,
                                                                  int end)
Returns a range of all the users belonging to the company.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
companyId - the primary key of the company
start - the lower bound of the range of users
end - the upper bound of the range of users (not inclusive)
Returns:
the range of users belonging to the company

getCompanyUsersCount

public int getCompanyUsersCount(long companyId)
Returns the number of users belonging to the company.

Parameters:
companyId - the primary key of the company
Returns:
the number of users belonging to the company

getDefaultUser

@Skip
public com.liferay.portal.kernel.model.User getDefaultUser(long companyId)
                                                    throws com.liferay.portal.kernel.exception.PortalException
Returns the default user for the company.

Parameters:
companyId - the primary key of the company
Returns:
the default user for the company
Throws:
com.liferay.portal.kernel.exception.PortalException

getDefaultUserId

@Skip
public long getDefaultUserId(long companyId)
                      throws com.liferay.portal.kernel.exception.PortalException
Returns the primary key of the default user for the company.

Parameters:
companyId - the primary key of the company
Returns:
the primary key of the default user for the company
Throws:
com.liferay.portal.kernel.exception.PortalException

getGroupUserIds

public long[] getGroupUserIds(long groupId)
Returns the primary keys of all the users belonging to the group.

Parameters:
groupId - the primary key of the group
Returns:
the primary keys of the users belonging to the group

getGroupUsersCount

public int getGroupUsersCount(long groupId,
                              int status)
                       throws com.liferay.portal.kernel.exception.PortalException
Returns the number of users with the status belonging to the group.

Parameters:
groupId - the primary key of the group
status - the workflow status
Returns:
the number of users with the status belonging to the group
Throws:
com.liferay.portal.kernel.exception.PortalException

getInheritedRoleUsers

public List<com.liferay.portal.kernel.model.User> getInheritedRoleUsers(long roleId,
                                                                        int start,
                                                                        int end,
                                                                        com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
                                                                 throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

getNoAnnouncementsDeliveries

public List<com.liferay.portal.kernel.model.User> getNoAnnouncementsDeliveries(String type)
Returns all the users who have not had any announcements of the type delivered, excluding the default user.

Parameters:
type - the type of announcement
Returns:
the users who have not had any annoucements of the type delivered

getNoContacts

public List<com.liferay.portal.kernel.model.User> getNoContacts()
Returns all the users who do not have any contacts.

Returns:
the users who do not have any contacts

getNoGroups

public List<com.liferay.portal.kernel.model.User> getNoGroups()
Returns all the users who do not belong to any groups, excluding the default user.

Returns:
the users who do not belong to any groups

getOrganizationUserIds

public long[] getOrganizationUserIds(long organizationId)
Returns the primary keys of all the users belonging to the organization.

Parameters:
organizationId - the primary key of the organization
Returns:
the primary keys of the users belonging to the organization

getOrganizationUsersCount

public int getOrganizationUsersCount(long organizationId,
                                     int status)
                              throws com.liferay.portal.kernel.exception.PortalException
Returns the number of users with the status belonging to the organization.

Parameters:
organizationId - the primary key of the organization
status - the workflow status
Returns:
the number of users with the status belonging to the organization
Throws:
com.liferay.portal.kernel.exception.PortalException

getRoleUserIds

public long[] getRoleUserIds(long roleId)
Returns the primary keys of all the users belonging to the role.

Parameters:
roleId - the primary key of the role
Returns:
the primary keys of the users belonging to the role

getRoleUsersCount

public int getRoleUsersCount(long roleId,
                             int status)
                      throws com.liferay.portal.kernel.exception.PortalException
Returns the number of users with the status belonging to the role.

Parameters:
roleId - the primary key of the role
status - the workflow status
Returns:
the number of users with the status belonging to the role
Throws:
com.liferay.portal.kernel.exception.PortalException

getSocialUsers

@Deprecated
public List<com.liferay.portal.kernel.model.User> getSocialUsers(long userId,
                                                                            int socialRelationType,
                                                                            int start,
                                                                            int end,
                                                                            com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
                                                          throws com.liferay.portal.kernel.exception.PortalException
Deprecated. As of 7.0.0, replaced by getSocialUsers(long, int, String, int, int, OrderByComparator)

Returns an ordered range of all the users with a social relation of the type with the user.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
userId - the primary key of the user
socialRelationType - the type of social relation. The possible types can be found in SocialRelationConstants.
start - the lower bound of the range of users
end - the upper bound of the range of users (not inclusive)
obc - the comparator to order the users by (optionally null)
Returns:
the ordered range of users with a social relation of the type with the user
Throws:
com.liferay.portal.kernel.exception.PortalException

getSocialUsers

@Deprecated
public List<com.liferay.portal.kernel.model.User> getSocialUsers(long userId,
                                                                            int start,
                                                                            int end,
                                                                            com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
                                                          throws com.liferay.portal.kernel.exception.PortalException
Deprecated. As of 7.0.0, replaced by getSocialUsers(long, int, String, int, int, OrderByComparator)

Returns an ordered range of all the users with a social relation with the user.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
userId - the primary key of the user
start - the lower bound of the range of users
end - the upper bound of the range of users (not inclusive)
obc - the comparator to order the users by (optionally null)
Returns:
the ordered range of users with a social relation with the user
Throws:
com.liferay.portal.kernel.exception.PortalException

getSocialUsers

public List<com.liferay.portal.kernel.model.User> getSocialUsers(long userId,
                                                                 int socialRelationType,
                                                                 String socialRelationTypeComparator,
                                                                 int start,
                                                                 int end,
                                                                 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
                                                          throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

getSocialUsers

public List<com.liferay.portal.kernel.model.User> getSocialUsers(long userId1,
                                                                 long userId2,
                                                                 int socialRelationType,
                                                                 int start,
                                                                 int end,
                                                                 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
                                                          throws com.liferay.portal.kernel.exception.PortalException
Returns an ordered range of all the users with a mutual social relation of the type with both of the given users.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
userId1 - the primary key of the first user
userId2 - the primary key of the second user
socialRelationType - the type of social relation. The possible types can be found in SocialRelationConstants.
start - the lower bound of the range of users
end - the upper bound of the range of users (not inclusive)
obc - the comparator to order the users by (optionally null)
Returns:
the ordered range of users with a mutual social relation of the type with the user
Throws:
com.liferay.portal.kernel.exception.PortalException

getSocialUsers

public List<com.liferay.portal.kernel.model.User> getSocialUsers(long userId1,
                                                                 long userId2,
                                                                 int start,
                                                                 int end,
                                                                 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
                                                          throws com.liferay.portal.kernel.exception.PortalException
Returns an ordered range of all the users with a mutual social relation with both of the given users.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
userId1 - the primary key of the first user
userId2 - the primary key of the second user
start - the lower bound of the range of users
end - the upper bound of the range of users (not inclusive)
obc - the comparator to order the users by (optionally null)
Returns:
the ordered range of users with a mutual social relation with the user
Throws:
com.liferay.portal.kernel.exception.PortalException

getSocialUsersCount

@Deprecated
public int getSocialUsersCount(long userId)
                        throws com.liferay.portal.kernel.exception.PortalException
Deprecated. As of 7.0.0, replaced by getSocialUsersCount(long, int, String)

Returns the number of users with a social relation with the user.

Parameters:
userId - the primary key of the user
Returns:
the number of users with a social relation with the user
Throws:
com.liferay.portal.kernel.exception.PortalException

getSocialUsersCount

@Deprecated
public int getSocialUsersCount(long userId,
                                          int socialRelationType)
                        throws com.liferay.portal.kernel.exception.PortalException
Deprecated. As of 7.0.0, replaced by getSocialUsersCount(long, int, String)

Returns the number of users with a social relation of the type with the user.

Parameters:
userId - the primary key of the user
socialRelationType - the type of social relation. The possible types can be found in SocialRelationConstants.
Returns:
the number of users with a social relation of the type with the user
Throws:
com.liferay.portal.kernel.exception.PortalException

getSocialUsersCount

public int getSocialUsersCount(long userId,
                               int socialRelationType,
                               String socialRelationTypeComparator)
                        throws com.liferay.portal.kernel.exception.PortalException
Returns the number of users with a social relation with the user.

Parameters:
userId - the primary key of the user
socialRelationType - the type of social relation. The possible types can be found in SocialRelationConstants.
Returns:
the number of users with a social relation with the user
Throws:
com.liferay.portal.kernel.exception.PortalException

getSocialUsersCount

public int getSocialUsersCount(long userId1,
                               long userId2)
                        throws com.liferay.portal.kernel.exception.PortalException
Returns the number of users with a mutual social relation with both of the given users.

Parameters:
userId1 - the primary key of the first user
userId2 - the primary key of the second user
Returns:
the number of users with a mutual social relation with the user
Throws:
com.liferay.portal.kernel.exception.PortalException

getSocialUsersCount

public int getSocialUsersCount(long userId1,
                               long userId2,
                               int socialRelationType)
                        throws com.liferay.portal.kernel.exception.PortalException
Returns the number of users with a mutual social relation of the type with both of the given users.

Parameters:
userId1 - the primary key of the first user
userId2 - the primary key of the second user
socialRelationType - the type of social relation. The possible types can be found in SocialRelationConstants.
Returns:
the number of users with a mutual social relation of the type with the user
Throws:
com.liferay.portal.kernel.exception.PortalException

getUserByContactId

public com.liferay.portal.kernel.model.User getUserByContactId(long contactId)
                                                        throws com.liferay.portal.kernel.exception.PortalException
Returns the user with the contact ID.

Parameters:
contactId - the user's contact ID
Returns:
the user with the contact ID
Throws:
com.liferay.portal.kernel.exception.PortalException

getUserByEmailAddress

public com.liferay.portal.kernel.model.User getUserByEmailAddress(long companyId,
                                                                  String emailAddress)
                                                           throws com.liferay.portal.kernel.exception.PortalException
Returns the user with the email address.

Parameters:
companyId - the primary key of the user's company
emailAddress - the user's email address
Returns:
the user with the email address
Throws:
com.liferay.portal.kernel.exception.PortalException

getUserByFacebookId

public com.liferay.portal.kernel.model.User getUserByFacebookId(long companyId,
                                                                long facebookId)
                                                         throws com.liferay.portal.kernel.exception.PortalException
Returns the user with the Facebook ID.

Parameters:
companyId - the primary key of the user's company
facebookId - the user's Facebook ID
Returns:
the user with the Facebook ID
Throws:
com.liferay.portal.kernel.exception.PortalException

getUserByGoogleUserId

public com.liferay.portal.kernel.model.User getUserByGoogleUserId(long companyId,
                                                                  String googleUserId)
                                                           throws com.liferay.portal.kernel.exception.PortalException
Returns the user with the Google user ID.

Parameters:
companyId - the primary key of the user's company
googleUserId - the user's Google user ID
Returns:
the user with the Google user ID
Throws:
com.liferay.portal.kernel.exception.PortalException

getUserById

public com.liferay.portal.kernel.model.User getUserById(long userId)
                                                 throws com.liferay.portal.kernel.exception.PortalException
Returns the user with the primary key.

Parameters:
userId - the primary key of the user
Returns:
the user with the primary key
Throws:
com.liferay.portal.kernel.exception.PortalException

getUserById

public com.liferay.portal.kernel.model.User getUserById(long companyId,
                                                        long userId)
                                                 throws com.liferay.portal.kernel.exception.PortalException
Returns the user with the primary key from the company.

Parameters:
companyId - the primary key of the user's company
userId - the primary key of the user
Returns:
the user with the primary key
Throws:
com.liferay.portal.kernel.exception.PortalException

getUserByOpenId

public com.liferay.portal.kernel.model.User getUserByOpenId(long companyId,
                                                            String openId)
                                                     throws com.liferay.portal.kernel.exception.PortalException
Returns the user with the OpenID.

Parameters:
companyId - the primary key of the user's company
openId - the user's OpenID
Returns:
the user with the OpenID
Throws:
com.liferay.portal.kernel.exception.PortalException

getUserByPortraitId

public com.liferay.portal.kernel.model.User getUserByPortraitId(long portraitId)
                                                         throws com.liferay.portal.kernel.exception.PortalException
Returns the user with the portrait ID.

Parameters:
portraitId - the user's portrait ID
Returns:
the user with the portrait ID
Throws:
com.liferay.portal.kernel.exception.PortalException

getUserByScreenName

public com.liferay.portal.kernel.model.User getUserByScreenName(long companyId,
                                                                String screenName)
                                                         throws com.liferay.portal.kernel.exception.PortalException
Returns the user with the screen name.

Parameters:
companyId - the primary key of the user's company
screenName - the user's screen name
Returns:
the user with the screen name
Throws:
com.liferay.portal.kernel.exception.PortalException

getUserByUuidAndCompanyId

public com.liferay.portal.kernel.model.User getUserByUuidAndCompanyId(String uuid,
                                                                      long companyId)
                                                               throws com.liferay.portal.kernel.exception.PortalException
Returns the user with the UUID.

Specified by:
getUserByUuidAndCompanyId in interface com.liferay.portal.kernel.service.UserLocalService
Overrides:
getUserByUuidAndCompanyId in class UserLocalServiceBaseImpl
Parameters:
uuid - the user's UUID
companyId - the primary key of the user's company
Returns:
the user with the UUID
Throws:
com.liferay.portal.kernel.exception.PortalException - if a matching user could not be found

getUserGroupUsersCount

public int getUserGroupUsersCount(long userGroupId,
                                  int status)
                           throws com.liferay.portal.kernel.exception.PortalException
Returns the number of users with the status belonging to the user group.

Parameters:
userGroupId - the primary key of the user group
status - the workflow status
Returns:
the number of users with the status belonging to the user group
Throws:
com.liferay.portal.kernel.exception.PortalException

getUserIdByEmailAddress

public long getUserIdByEmailAddress(long companyId,
                                    String emailAddress)
                             throws com.liferay.portal.kernel.exception.PortalException
Returns the primary key of the user with the email address.

Parameters:
companyId - the primary key of the user's company
emailAddress - the user's email address
Returns:
the primary key of the user with the email address
Throws:
com.liferay.portal.kernel.exception.PortalException

getUserIdByScreenName

public long getUserIdByScreenName(long companyId,
                                  String screenName)
                           throws com.liferay.portal.kernel.exception.PortalException
Returns the primary key of the user with the screen name.

Parameters:
companyId - the primary key of the user's company
screenName - the user's screen name
Returns:
the primary key of the user with the screen name
Throws:
com.liferay.portal.kernel.exception.PortalException

hasPasswordPolicyUser

public boolean hasPasswordPolicyUser(long passwordPolicyId,
                                     long userId)
Returns true if the password policy has been assigned to the user.

Parameters:
passwordPolicyId - the primary key of the password policy
userId - the primary key of the user
Returns:
true if the password policy is assigned to the user; false otherwise

hasRoleUser

public boolean hasRoleUser(long companyId,
                           String name,
                           long userId,
                           boolean inherited)
                    throws com.liferay.portal.kernel.exception.PortalException
Returns true if the user has the role with the name, optionally through inheritance.

Parameters:
companyId - the primary key of the role's company
name - the name of the role (must be a regular role, not an organization, site or provider role)
userId - the primary key of the user
inherited - whether to include roles inherited from organizations, sites, etc.
Returns:
true if the user has the role; false otherwise
Throws:
com.liferay.portal.kernel.exception.PortalException

isPasswordExpired

public boolean isPasswordExpired(com.liferay.portal.kernel.model.User user)
                          throws com.liferay.portal.kernel.exception.PortalException
Returns true if the user's password is expired.

Parameters:
user - the user
Returns:
true if the user's password is expired; false otherwise
Throws:
com.liferay.portal.kernel.exception.PortalException

isPasswordExpiringSoon

public boolean isPasswordExpiringSoon(com.liferay.portal.kernel.model.User user)
                               throws com.liferay.portal.kernel.exception.PortalException
Returns true if the password policy is configured to warn the user that his password is expiring and the remaining time until expiration is equal or less than the configured warning time.

Parameters:
user - the user
Returns:
true if the user's password is expiring soon; false otherwise
Throws:
com.liferay.portal.kernel.exception.PortalException

loadGetDefaultUser

public com.liferay.portal.kernel.model.User loadGetDefaultUser(long companyId)
                                                        throws com.liferay.portal.kernel.exception.PortalException
Returns the default user for the company.

Parameters:
companyId - the primary key of the company
Returns:
the default user for the company
Throws:
com.liferay.portal.kernel.exception.PortalException

search

public List<com.liferay.portal.kernel.model.User> search(long companyId,
                                                         String keywords,
                                                         int status,
                                                         LinkedHashMap<String,Object> params,
                                                         int start,
                                                         int end,
                                                         com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
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 version search(long, String, int, LinkedHashMap, int, int, Sort) instead of this method wherever possible for performance reasons.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
companyId - the primary key of the user's company
keywords - the keywords (space separated), which may occur in the user's first name, middle name, last name, screen name, or email address
status - the workflow status
params - the finder parameters (optionally null). For more information see UserFinder.
start - the lower bound of the range of users
end - the upper bound of the range of users (not inclusive)
obc - the comparator to order the users by (optionally null)
Returns:
the matching users
See Also:
UserFinder

search

public com.liferay.portal.kernel.search.Hits search(long companyId,
                                                    String keywords,
                                                    int status,
                                                    LinkedHashMap<String,Object> params,
                                                    int start,
                                                    int end,
                                                    com.liferay.portal.kernel.search.Sort sort)
Returns an ordered range of all the users who match the keywords and status, using the indexer. It is preferable to use this method instead of the non-indexed version whenever possible for performance reasons.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
companyId - the primary key of the user's company
keywords - the keywords (space separated), which may occur in the user's first name, middle name, last name, screen name, or email address
status - the workflow status
params - the indexer parameters (optionally null). For more information see UserIndexer.
start - the lower bound of the range of users
end - the upper bound of the range of users (not inclusive)
sort - the field and direction to sort by (optionally null)
Returns:
the matching users
See Also:
UserIndexer

search

public com.liferay.portal.kernel.search.Hits search(long companyId,
                                                    String keywords,
                                                    int status,
                                                    LinkedHashMap<String,Object> params,
                                                    int start,
                                                    int end,
                                                    com.liferay.portal.kernel.search.Sort[] sorts)

search

public List<com.liferay.portal.kernel.model.User> search(long companyId,
                                                         String firstName,
                                                         String middleName,
                                                         String lastName,
                                                         String screenName,
                                                         String emailAddress,
                                                         int status,
                                                         LinkedHashMap<String,Object> params,
                                                         boolean andSearch,
                                                         int start,
                                                         int end,
                                                         com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)
Returns an ordered range of all the users with the status, and whose first name, middle name, last name, screen name, and email address match the keywords specified for them, without using the indexer. It is preferable to use the indexed version search(long, String, String, String, String, String, int, LinkedHashMap, boolean, int, int, Sort) instead of this method wherever possible for performance reasons.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
companyId - the primary key of the user's company
firstName - the first name keywords (space separated)
middleName - the middle name keywords
lastName - the last name keywords
screenName - the screen name keywords
emailAddress - the email address keywords
status - the workflow status
params - the finder parameters (optionally null). For more information see UserFinder.
andSearch - whether every field must match its keywords, or just one field. For example, "users with the first name 'bob' and last name 'smith'" vs "users with the first name 'bob' or the last name 'smith'".
start - the lower bound of the range of users
end - the upper bound of the range of users (not inclusive)
obc - the comparator to order the users by (optionally null)
Returns:
the matching users
See Also:
UserFinder

search

public com.liferay.portal.kernel.search.Hits search(long companyId,
                                                    String firstName,
                                                    String middleName,
                                                    String lastName,
                                                    String screenName,
                                                    String emailAddress,
                                                    int status,
                                                    LinkedHashMap<String,Object> params,
                                                    boolean andSearch,
                                                    int start,
                                                    int end,
                                                    com.liferay.portal.kernel.search.Sort sort)
Returns an ordered range of all the users with the status, and whose first name, middle name, last name, screen name, and email address match the keywords specified for them, using the indexer. It is preferable to use this method instead of the non-indexed version whenever possible for performance reasons.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
companyId - the primary key of the user's company
firstName - the first name keywords (space separated)
middleName - the middle name keywords
lastName - the last name keywords
screenName - the screen name keywords
emailAddress - the email address keywords
status - the workflow status
params - the indexer parameters (optionally null). For more information see UserIndexer.
andSearch - whether every field must match its keywords, or just one field. For example, "users with the first name 'bob' and last name 'smith'" vs "users with the first name 'bob' or the last name 'smith'".
start - the lower bound of the range of users
end - the upper bound of the range of users (not inclusive)
sort - the field and direction to sort by (optionally null)
Returns:
the matching users
See Also:
UserIndexer

search

public com.liferay.portal.kernel.search.Hits search(long companyId,
                                                    String firstName,
                                                    String middleName,
                                                    String lastName,
                                                    String screenName,
                                                    String emailAddress,
                                                    int status,
                                                    LinkedHashMap<String,Object> params,
                                                    boolean andSearch,
                                                    int start,
                                                    int end,
                                                    com.liferay.portal.kernel.search.Sort[] sorts)

searchCount

public int searchCount(long companyId,
                       String keywords,
                       int status,
                       LinkedHashMap<String,Object> params)
Returns the number of users who match the keywords and status.

Parameters:
companyId - the primary key of the user's company
keywords - the keywords (space separated), which may occur in the user's first name, middle name, last name, screen name, or email address
status - the workflow status
params - the finder parameters (optionally null). For more information see UserFinder.
Returns:
the number matching users

searchCount

public int searchCount(long companyId,
                       String firstName,
                       String middleName,
                       String lastName,
                       String screenName,
                       String emailAddress,
                       int status,
                       LinkedHashMap<String,Object> params,
                       boolean andSearch)
Returns the number of users with the status, and whose first name, middle name, last name, screen name, and email address match the keywords specified for them.

Parameters:
companyId - the primary key of the user's company
firstName - the first name keywords (space separated)
middleName - the middle name keywords
lastName - the last name keywords
screenName - the screen name keywords
emailAddress - the email address keywords
status - the workflow status
params - the finder parameters (optionally null). For more information see UserFinder.
andSearch - whether every field must match its keywords, or just one field. For example, "users with the first name 'bob' and last name 'smith'" vs "users with the first name 'bob' or the last name 'smith'".
Returns:
the number of matching users

searchCounts

public Map<Long,Integer> searchCounts(long companyId,
                                      int status,
                                      long[] groupIds)

searchSocial

public List<com.liferay.portal.kernel.model.User> searchSocial(long userId,
                                                               int[] socialRelationTypes,
                                                               String keywords,
                                                               int start,
                                                               int end)
                                                        throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

searchSocial

public List<com.liferay.portal.kernel.model.User> searchSocial(long companyId,
                                                               long[] groupIds,
                                                               String keywords,
                                                               int start,
                                                               int end)

searchSocial

public List<com.liferay.portal.kernel.model.User> searchSocial(long[] groupIds,
                                                               long userId,
                                                               int[] socialRelationTypes,
                                                               String keywords,
                                                               int start,
                                                               int end)
                                                        throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

searchUsers

public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> searchUsers(long companyId,
                                                                                                                String keywords,
                                                                                                                int status,
                                                                                                                LinkedHashMap<String,Object> params,
                                                                                                                int start,
                                                                                                                int end,
                                                                                                                com.liferay.portal.kernel.search.Sort sort)
                                                                                                         throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

searchUsers

public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> searchUsers(long companyId,
                                                                                                                String keywords,
                                                                                                                int status,
                                                                                                                LinkedHashMap<String,Object> params,
                                                                                                                int start,
                                                                                                                int end,
                                                                                                                com.liferay.portal.kernel.search.Sort[] sorts)
                                                                                                         throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

searchUsers

public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> searchUsers(long companyId,
                                                                                                                String firstName,
                                                                                                                String middleName,
                                                                                                                String lastName,
                                                                                                                String screenName,
                                                                                                                String emailAddress,
                                                                                                                int status,
                                                                                                                LinkedHashMap<String,Object> params,
                                                                                                                boolean andSearch,
                                                                                                                int start,
                                                                                                                int end,
                                                                                                                com.liferay.portal.kernel.search.Sort sort)
                                                                                                         throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

searchUsers

public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> searchUsers(long companyId,
                                                                                                                String firstName,
                                                                                                                String middleName,
                                                                                                                String lastName,
                                                                                                                String screenName,
                                                                                                                String emailAddress,
                                                                                                                int status,
                                                                                                                LinkedHashMap<String,Object> params,
                                                                                                                boolean andSearch,
                                                                                                                int start,
                                                                                                                int end,
                                                                                                                com.liferay.portal.kernel.search.Sort[] sorts)
                                                                                                         throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

sendEmailAddressVerification

public void sendEmailAddressVerification(com.liferay.portal.kernel.model.User user,
                                         String emailAddress,
                                         com.liferay.portal.kernel.service.ServiceContext serviceContext)
                                  throws com.liferay.portal.kernel.exception.PortalException
Sends an email address verification to the user.

Parameters:
user - the verification email recipient
emailAddress - the recipient's email address
serviceContext - the service context to be applied. Must set the portal URL, main path, primary key of the layout, remote address, remote host, and agent for the user.
Throws:
com.liferay.portal.kernel.exception.PortalException

sendPassword

public boolean sendPassword(long companyId,
                            String emailAddress,
                            String fromName,
                            String fromAddress,
                            String subject,
                            String body,
                            com.liferay.portal.kernel.service.ServiceContext serviceContext)
                     throws com.liferay.portal.kernel.exception.PortalException
Sends the password email to the user with the email address. The content of this email can be specified in portal.properties with the admin.email.password keys.

Parameters:
companyId - the primary key of the user's company
emailAddress - the user's email address
fromName - the name of the individual that the email should be from
fromAddress - the address of the individual that the email should be from
subject - the email subject. If null, the subject specified in portal.properties will be used.
body - the email body. If null, the body specified in portal.properties will be used.
serviceContext - the service context to be applied
Throws:
com.liferay.portal.kernel.exception.PortalException

sendPasswordByEmailAddress

public boolean sendPasswordByEmailAddress(long companyId,
                                          String emailAddress)
                                   throws com.liferay.portal.kernel.exception.PortalException
Sends a password notification email to the user matching the email address. The portal's settings determine whether a password is sent explicitly or whether a link for resetting the user's password is sent. The method sends the email asynchronously and returns before the email is sent.

The content of the notification email is specified with the admin.email.password portal property keys. They can be overridden via a portal-ext.properties file or modified through the Portal Settings UI.

Parameters:
companyId - the primary key of the user's company
emailAddress - the user's email address
Returns:
true if the notification email includes a new password; false if the notification email only contains a reset link
Throws:
com.liferay.portal.kernel.exception.PortalException

sendPasswordByScreenName

public boolean sendPasswordByScreenName(long companyId,
                                        String screenName)
                                 throws com.liferay.portal.kernel.exception.PortalException
Sends a password notification email to the user matching the screen name. The portal's settings determine whether a password is sent explicitly or whether a link for resetting the user's password is sent. The method sends the email asynchronously and returns before the email is sent.

The content of the notification email is specified with the admin.email.password portal property keys. They can be overridden via a portal-ext.properties file or modified through the Portal Settings UI.

Parameters:
companyId - the primary key of the user's company
screenName - the user's screen name
Returns:
true if the notification email includes a new password; false if the notification email only contains a reset link
Throws:
com.liferay.portal.kernel.exception.PortalException

sendPasswordByUserId

public boolean sendPasswordByUserId(long userId)
                             throws com.liferay.portal.kernel.exception.PortalException
Sends a password notification email to the user matching the ID. The portal's settings determine whether a password is sent explicitly or whether a link for resetting the user's password is sent. The method sends the email asynchronously and returns before the email is sent.

The content of the notification email is specified with the admin.email.password portal property keys. They can be overridden via a portal-ext.properties file or modified through the Portal Settings UI.

Parameters:
userId - the user's primary key
Returns:
true if the notification email includes a new password; false if the notification email only contains a reset link
Throws:
com.liferay.portal.kernel.exception.PortalException

setRoleUsers

public void setRoleUsers(long roleId,
                         long[] userIds)
                  throws com.liferay.portal.kernel.exception.PortalException
Sets the users in the role, removing and adding users to the role as necessary.

Specified by:
setRoleUsers in interface com.liferay.portal.kernel.service.UserLocalService
Overrides:
setRoleUsers in class UserLocalServiceBaseImpl
Parameters:
roleId - the primary key of the role
userIds - the primary keys of the users
Throws:
com.liferay.portal.kernel.exception.PortalException

setUserGroupUsers

public void setUserGroupUsers(long userGroupId,
                              long[] userIds)
                       throws com.liferay.portal.kernel.exception.PortalException
Sets the users in the user group, removing and adding users to the user group as necessary.

Specified by:
setUserGroupUsers in interface com.liferay.portal.kernel.service.UserLocalService
Overrides:
setUserGroupUsers in class UserLocalServiceBaseImpl
Parameters:
userGroupId - the primary key of the user group
userIds - the primary keys of the users
Throws:
com.liferay.portal.kernel.exception.PortalException

unsetGroupTeamsUsers

public void unsetGroupTeamsUsers(long groupId,
                                 long[] userIds)
                          throws com.liferay.portal.kernel.exception.PortalException
Removes the users from the teams of a group.

Parameters:
groupId - the primary key of the group
userIds - the primary keys of the users
Throws:
com.liferay.portal.kernel.exception.PortalException

unsetGroupUsers

public void unsetGroupUsers(long groupId,
                            long[] userIds,
                            com.liferay.portal.kernel.service.ServiceContext serviceContext)
                     throws com.liferay.portal.kernel.exception.PortalException
Removes the users from the group.

Parameters:
groupId - the primary key of the group
userIds - the primary keys of the users
serviceContext - the service context to be applied (optionally null)
Throws:
com.liferay.portal.kernel.exception.PortalException

unsetOrganizationUsers

public void unsetOrganizationUsers(long organizationId,
                                   long[] userIds)
                            throws com.liferay.portal.kernel.exception.PortalException
Removes the users from the organization.

Parameters:
organizationId - the primary key of the organization
userIds - the primary keys of the users
Throws:
com.liferay.portal.kernel.exception.PortalException

unsetPasswordPolicyUsers

public void unsetPasswordPolicyUsers(long passwordPolicyId,
                                     long[] userIds)
Removes the users from the password policy.

Parameters:
passwordPolicyId - the primary key of the password policy
userIds - the primary keys of the users

unsetRoleUsers

public void unsetRoleUsers(long roleId,
                           List<com.liferay.portal.kernel.model.User> users)
                    throws com.liferay.portal.kernel.exception.PortalException
Removes the users from the role.

Parameters:
roleId - the primary key of the role
users - the users
Throws:
com.liferay.portal.kernel.exception.PortalException

unsetRoleUsers

public void unsetRoleUsers(long roleId,
                           long[] userIds)
                    throws com.liferay.portal.kernel.exception.PortalException
Removes the users from the role.

Parameters:
roleId - the primary key of the role
userIds - the primary keys of the users
Throws:
com.liferay.portal.kernel.exception.PortalException

unsetTeamUsers

public void unsetTeamUsers(long teamId,
                           long[] userIds)
                    throws com.liferay.portal.kernel.exception.PortalException
Removes the users from the team.

Parameters:
teamId - the primary key of the team
userIds - the primary keys of the users
Throws:
com.liferay.portal.kernel.exception.PortalException

unsetUserGroupUsers

public void unsetUserGroupUsers(long userGroupId,
                                long[] userIds)
                         throws com.liferay.portal.kernel.exception.PortalException
Removes the users from the user group.

Parameters:
userGroupId - the primary key of the user group
userIds - the primary keys of the users
Throws:
com.liferay.portal.kernel.exception.PortalException

updateAgreedToTermsOfUse

public com.liferay.portal.kernel.model.User updateAgreedToTermsOfUse(long userId,
                                                                     boolean agreedToTermsOfUse)
                                                              throws com.liferay.portal.kernel.exception.PortalException
Updates whether the user has agreed to the terms of use.

Parameters:
userId - the primary key of the user
agreedToTermsOfUse - whether the user has agreet to the terms of use
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateAsset

public void updateAsset(long userId,
                        com.liferay.portal.kernel.model.User user,
                        long[] assetCategoryIds,
                        String[] assetTagNames)
                 throws com.liferay.portal.kernel.exception.PortalException
Updates the user's asset with the new asset categories and tag names, removing and adding asset categories and tag names as necessary.

Parameters:
userId - the primary key of the user
user - ID the primary key of the user
assetCategoryIds - the primary key's of the new asset categories
assetTagNames - the new asset tag names
Throws:
com.liferay.portal.kernel.exception.PortalException

updateCreateDate

public com.liferay.portal.kernel.model.User updateCreateDate(long userId,
                                                             Date createDate)
                                                      throws com.liferay.portal.kernel.exception.PortalException
Updates the user's creation date.

Parameters:
userId - the primary key of the user
createDate - the new creation date
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateEmailAddress

public com.liferay.portal.kernel.model.User updateEmailAddress(long userId,
                                                               String password,
                                                               String emailAddress1,
                                                               String emailAddress2)
                                                        throws com.liferay.portal.kernel.exception.PortalException
Updates the user's email address.

Parameters:
userId - the primary key of the user
password - the user's password
emailAddress1 - the user's new email address
emailAddress2 - the user's new email address confirmation
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateEmailAddress

public com.liferay.portal.kernel.model.User updateEmailAddress(long userId,
                                                               String password,
                                                               String emailAddress1,
                                                               String emailAddress2,
                                                               com.liferay.portal.kernel.service.ServiceContext serviceContext)
                                                        throws com.liferay.portal.kernel.exception.PortalException
Updates the user's email address or sends verification email.

Parameters:
userId - the primary key of the user
password - the user's password
emailAddress1 - the user's new email address
emailAddress2 - the user's new email address confirmation
serviceContext - the service context to be applied. Must set the portal URL, main path, primary key of the layout, remote address, remote host, and agent for the user.
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateEmailAddressVerified

public com.liferay.portal.kernel.model.User updateEmailAddressVerified(long userId,
                                                                       boolean emailAddressVerified)
                                                                throws com.liferay.portal.kernel.exception.PortalException
Updates whether the user has verified email address.

Parameters:
userId - the primary key of the user
emailAddressVerified - whether the user has verified email address
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateFacebookId

public com.liferay.portal.kernel.model.User updateFacebookId(long userId,
                                                             long facebookId)
                                                      throws com.liferay.portal.kernel.exception.PortalException
Updates the user's Facebook ID.

Parameters:
userId - the primary key of the user
facebookId - the user's new Facebook ID
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateGoogleUserId

public com.liferay.portal.kernel.model.User updateGoogleUserId(long userId,
                                                               String googleUserId)
                                                        throws com.liferay.portal.kernel.exception.PortalException
Updates the user's Google user ID.

Parameters:
userId - the primary key of the user
googleUserId - the new Google user ID
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateGroups

public void updateGroups(long userId,
                         long[] newGroupIds,
                         com.liferay.portal.kernel.service.ServiceContext serviceContext)
                  throws com.liferay.portal.kernel.exception.PortalException
Sets the groups the user is in, removing and adding groups as necessary.

Parameters:
userId - the primary key of the user
newGroupIds - the primary keys of the groups
serviceContext - the service context to be applied (optionally null)
Throws:
com.liferay.portal.kernel.exception.PortalException

updateIncompleteUser

public com.liferay.portal.kernel.model.User updateIncompleteUser(long creatorUserId,
                                                                 long companyId,
                                                                 boolean autoPassword,
                                                                 String password1,
                                                                 String password2,
                                                                 boolean autoScreenName,
                                                                 String screenName,
                                                                 String emailAddress,
                                                                 long facebookId,
                                                                 String openId,
                                                                 Locale locale,
                                                                 String firstName,
                                                                 String middleName,
                                                                 String lastName,
                                                                 long prefixId,
                                                                 long suffixId,
                                                                 boolean male,
                                                                 int birthdayMonth,
                                                                 int birthdayDay,
                                                                 int birthdayYear,
                                                                 String jobTitle,
                                                                 boolean updateUserInformation,
                                                                 boolean sendEmail,
                                                                 com.liferay.portal.kernel.service.ServiceContext serviceContext)
                                                          throws com.liferay.portal.kernel.exception.PortalException
Updates a user account that was automatically created when a guest user participated in an action (e.g. posting a comment) and only provided his name and email address.

Parameters:
creatorUserId - the primary key of the creator
companyId - the primary key of the user's company
autoPassword - whether a password should be automatically generated for the user
password1 - the user's password
password2 - the user's password confirmation
autoScreenName - whether a screen name should be automatically generated for the user
screenName - the user's screen name
emailAddress - the user's email address
facebookId - the user's facebook ID
openId - the user's OpenID
locale - the user's locale
firstName - the user's first name
middleName - the user's middle name
lastName - the user's last name
prefixId - the user's name prefix ID
suffixId - the user's name suffix ID
male - whether the user is male
birthdayMonth - the user's birthday month (0-based, meaning 0 for January)
birthdayDay - the user's birthday day
birthdayYear - the user's birthday year
jobTitle - the user's job title
updateUserInformation - whether to update the user's information
sendEmail - whether to send the user an email notification about their new account
serviceContext - the service context to be applied (optionally null). Can set expando bridge attributes for the user.
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateJobTitle

public com.liferay.portal.kernel.model.User updateJobTitle(long userId,
                                                           String jobTitle)
                                                    throws com.liferay.portal.kernel.exception.PortalException
Updates the user's job title.

Parameters:
userId - the primary key of the user
jobTitle - the user's job title
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateLastLogin

public com.liferay.portal.kernel.model.User updateLastLogin(long userId,
                                                            String loginIP)
                                                     throws com.liferay.portal.kernel.exception.PortalException
Updates the user's last login with the current time and the IP address.

Parameters:
userId - the primary key of the user
loginIP - the IP address the user logged in from
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateLockout

public com.liferay.portal.kernel.model.User updateLockout(com.liferay.portal.kernel.model.User user,
                                                          boolean lockout)
                                                   throws com.liferay.portal.kernel.exception.PortalException
Updates whether the user is locked out from logging in.

Parameters:
user - the user
lockout - whether the user is locked out
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateLockoutByEmailAddress

public com.liferay.portal.kernel.model.User updateLockoutByEmailAddress(long companyId,
                                                                        String emailAddress,
                                                                        boolean lockout)
                                                                 throws com.liferay.portal.kernel.exception.PortalException
Updates whether the user is locked out from logging in.

Parameters:
companyId - the primary key of the user's company
emailAddress - the user's email address
lockout - whether the user is locked out
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateLockoutById

public com.liferay.portal.kernel.model.User updateLockoutById(long userId,
                                                              boolean lockout)
                                                       throws com.liferay.portal.kernel.exception.PortalException
Updates whether the user is locked out from logging in.

Parameters:
userId - the primary key of the user
lockout - whether the user is locked out
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateLockoutByScreenName

public com.liferay.portal.kernel.model.User updateLockoutByScreenName(long companyId,
                                                                      String screenName,
                                                                      boolean lockout)
                                                               throws com.liferay.portal.kernel.exception.PortalException
Updates whether the user is locked out from logging in.

Parameters:
companyId - the primary key of the user's company
screenName - the user's screen name
lockout - whether the user is locked out
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateModifiedDate

public com.liferay.portal.kernel.model.User updateModifiedDate(long userId,
                                                               Date modifiedDate)
                                                        throws com.liferay.portal.kernel.exception.PortalException
Updates the user's modified date.

Parameters:
userId - the primary key of the user
modifiedDate - the new modified date
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateOpenId

public com.liferay.portal.kernel.model.User updateOpenId(long userId,
                                                         String openId)
                                                  throws com.liferay.portal.kernel.exception.PortalException
Updates the user's OpenID.

Parameters:
userId - the primary key of the user
openId - the new OpenID
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateOrganizations

public void updateOrganizations(long userId,
                                long[] newOrganizationIds,
                                com.liferay.portal.kernel.service.ServiceContext serviceContext)
                         throws com.liferay.portal.kernel.exception.PortalException
Sets the organizations that the user is in, removing and adding organizations as necessary.

Parameters:
userId - the primary key of the user
newOrganizationIds - the primary keys of the organizations
serviceContext - the service context to be applied. Must set whether user indexing is enabled.
Throws:
com.liferay.portal.kernel.exception.PortalException

updatePassword

public com.liferay.portal.kernel.model.User updatePassword(long userId,
                                                           String password1,
                                                           String password2,
                                                           boolean passwordReset)
                                                    throws com.liferay.portal.kernel.exception.PortalException
Updates the user's password without tracking or validation of the change.

Parameters:
userId - the primary key of the user
password1 - the user's new password
password2 - the user's new password confirmation
passwordReset - whether the user should be asked to reset their password the next time they log in
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updatePassword

public com.liferay.portal.kernel.model.User updatePassword(long userId,
                                                           String password1,
                                                           String password2,
                                                           boolean passwordReset,
                                                           boolean silentUpdate)
                                                    throws com.liferay.portal.kernel.exception.PortalException
Updates the user's password, optionally with tracking and validation of the change.

Parameters:
userId - the primary key of the user
password1 - the user's new password
password2 - the user's new password confirmation
passwordReset - whether the user should be asked to reset their password the next time they login
silentUpdate - whether the password should be updated without being tracked, or validated. Primarily used for password imports.
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updatePasswordManually

public com.liferay.portal.kernel.model.User updatePasswordManually(long userId,
                                                                   String password,
                                                                   boolean passwordEncrypted,
                                                                   boolean passwordReset,
                                                                   Date passwordModifiedDate)
                                                            throws com.liferay.portal.kernel.exception.PortalException
Updates the user's password with manually input information. This method should only be used when performing maintenance.

Parameters:
userId - the primary key of the user
password - the user's new password
passwordEncrypted - the user's new encrypted password
passwordReset - whether the user should be asked to reset their password the next time they login
passwordModifiedDate - the new password modified date
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updatePasswordReset

public com.liferay.portal.kernel.model.User updatePasswordReset(long userId,
                                                                boolean passwordReset)
                                                         throws com.liferay.portal.kernel.exception.PortalException
Updates whether the user should be asked to reset their password the next time they login.

Parameters:
userId - the primary key of the user
passwordReset - whether the user should be asked to reset their password the next time they login
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updatePortrait

public com.liferay.portal.kernel.model.User updatePortrait(long userId,
                                                           byte[] bytes)
                                                    throws com.liferay.portal.kernel.exception.PortalException
Updates the user's portrait image.

Parameters:
userId - the primary key of the user
bytes - the new portrait image data
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateReminderQuery

public com.liferay.portal.kernel.model.User updateReminderQuery(long userId,
                                                                String question,
                                                                String answer)
                                                         throws com.liferay.portal.kernel.exception.PortalException
Updates the user's password reset question and answer.

Parameters:
userId - the primary key of the user
question - the user's new password reset question
answer - the user's new password reset answer
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateScreenName

public com.liferay.portal.kernel.model.User updateScreenName(long userId,
                                                             String screenName)
                                                      throws com.liferay.portal.kernel.exception.PortalException
Updates the user's screen name.

Parameters:
userId - the primary key of the user
screenName - the user's new screen name
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateStatus

@Deprecated
public com.liferay.portal.kernel.model.User updateStatus(long userId,
                                                                    int status)
                                                  throws com.liferay.portal.kernel.exception.PortalException
Deprecated. As of 7.0.0, replaced by updateStatus(long, int, ServiceContext)

Updates the user's workflow status.

Parameters:
userId - the primary key of the user
status - the user's new workflow status
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateStatus

public com.liferay.portal.kernel.model.User updateStatus(long userId,
                                                         int status,
                                                         com.liferay.portal.kernel.service.ServiceContext serviceContext)
                                                  throws com.liferay.portal.kernel.exception.PortalException
Updates the user's workflow status.

Parameters:
userId - the primary key of the user
status - the user's new workflow status
serviceContext - the service context to be applied. You can specify an unencrypted custom password (used by an LDAP listener) for the user via attribute passwordUnencrypted.
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateUser

public com.liferay.portal.kernel.model.User updateUser(long userId,
                                                       String oldPassword,
                                                       String newPassword1,
                                                       String newPassword2,
                                                       boolean passwordReset,
                                                       String reminderQueryQuestion,
                                                       String reminderQueryAnswer,
                                                       String screenName,
                                                       String emailAddress,
                                                       long facebookId,
                                                       String openId,
                                                       boolean portrait,
                                                       byte[] portraitBytes,
                                                       String languageId,
                                                       String timeZoneId,
                                                       String greeting,
                                                       String comments,
                                                       String firstName,
                                                       String middleName,
                                                       String lastName,
                                                       long prefixId,
                                                       long suffixId,
                                                       boolean male,
                                                       int birthdayMonth,
                                                       int birthdayDay,
                                                       int birthdayYear,
                                                       String smsSn,
                                                       String facebookSn,
                                                       String jabberSn,
                                                       String skypeSn,
                                                       String twitterSn,
                                                       String jobTitle,
                                                       long[] groupIds,
                                                       long[] organizationIds,
                                                       long[] roleIds,
                                                       List<com.liferay.portal.kernel.model.UserGroupRole> userGroupRoles,
                                                       long[] userGroupIds,
                                                       com.liferay.portal.kernel.service.ServiceContext serviceContext)
                                                throws com.liferay.portal.kernel.exception.PortalException
Updates the user.

Parameters:
userId - the primary key of the user
oldPassword - the user's old password
newPassword1 - the user's new password (optionally null)
newPassword2 - the user's new password confirmation (optionally null)
passwordReset - whether the user should be asked to reset their password the next time they login
reminderQueryQuestion - the user's new password reset question
reminderQueryAnswer - the user's new password reset answer
screenName - the user's new screen name
emailAddress - the user's new email address
facebookId - the user's new Facebook ID
openId - the user's new OpenID
portrait - whether to update the user's portrait image
portraitBytes - the new portrait image data
languageId - the user's new language ID
timeZoneId - the user's new time zone ID
greeting - the user's new greeting
comments - the user's new comments
firstName - the user's new first name
middleName - the user's new middle name
lastName - the user's new last name
prefixId - the user's new name prefix ID
suffixId - the user's new name suffix ID
male - whether user is male
birthdayMonth - the user's new birthday month (0-based, meaning 0 for January)
birthdayDay - the user's new birthday day
birthdayYear - the user's birthday year
smsSn - the user's new SMS screen name
facebookSn - the user's new Facebook screen name
jabberSn - the user's new Jabber screen name
skypeSn - the user's new Skype screen name
twitterSn - the user's new Twitter screen name
jobTitle - the user's new job title
groupIds - the primary keys of the user's groups
organizationIds - the primary keys of the user's organizations
roleIds - the primary keys of the user's roles
userGroupRoles - the user user's group roles
userGroupIds - the primary keys of the user's user groups
serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

updateUser

@Deprecated
public com.liferay.portal.kernel.model.User updateUser(long userId,
                                                                  String oldPassword,
                                                                  String newPassword1,
                                                                  String newPassword2,
                                                                  boolean passwordReset,
                                                                  String reminderQueryQuestion,
                                                                  String reminderQueryAnswer,
                                                                  String screenName,
                                                                  String emailAddress,
                                                                  long facebookId,
                                                                  String openId,
                                                                  String languageId,
                                                                  String timeZoneId,
                                                                  String greeting,
                                                                  String comments,
                                                                  String firstName,
                                                                  String middleName,
                                                                  String lastName,
                                                                  long prefixId,
                                                                  long suffixId,
                                                                  boolean male,
                                                                  int birthdayMonth,
                                                                  int birthdayDay,
                                                                  int birthdayYear,
                                                                  String smsSn,
                                                                  String facebookSn,
                                                                  String jabberSn,
                                                                  String skypeSn,
                                                                  String twitterSn,
                                                                  String jobTitle,
                                                                  long[] groupIds,
                                                                  long[] organizationIds,
                                                                  long[] roleIds,
                                                                  List<com.liferay.portal.kernel.model.UserGroupRole> userGroupRoles,
                                                                  long[] userGroupIds,
                                                                  com.liferay.portal.kernel.service.ServiceContext serviceContext)
                                                throws com.liferay.portal.kernel.exception.PortalException
Deprecated. As of 7.0.0, replaced by updateUser(long, String, String, String, boolean, String, String, String, String, long, String, boolean, byte[], String, String, String, String, String, String, String, long, long, boolean, int, int, int, String, String, String, String, String, String, long[], long[], long[], List, long[], ServiceContext)

Updates the user.

Parameters:
userId - the primary key of the user
oldPassword - the user's old password
newPassword1 - the user's new password (optionally null)
newPassword2 - the user's new password confirmation (optionally null)
passwordReset - whether the user should be asked to reset their password the next time they login
reminderQueryQuestion - the user's new password reset question
reminderQueryAnswer - the user's new password reset answer
screenName - the user's new screen name
emailAddress - the user's new email address
facebookId - the user's new Facebook ID
openId - the user's new OpenID
languageId - the user's new language ID
timeZoneId - the user's new time zone ID
greeting - the user's new greeting
comments - the user's new comments
firstName - the user's new first name
middleName - the user's new middle name
lastName - the user's new last name
prefixId - the user's new name prefix ID
suffixId - the user's new name suffix ID
male - whether user is male
birthdayMonth - the user's new birthday month (0-based, meaning 0 for January)
birthdayDay - the user's new birthday day
birthdayYear - the user's birthday year
smsSn - the user's new SMS screen name
facebookSn - the user's new Facebook screen name
jabberSn - the user's new Jabber screen name
skypeSn - the user's new Skype screen name
twitterSn - the user's new Twitter screen name
jobTitle - the user's new job title
groupIds - the primary keys of the user's groups
organizationIds - the primary keys of the user's organizations
roleIds - the primary keys of the user's roles
userGroupRoles - the user user's group roles
userGroupIds - the primary keys of the user's user groups
serviceContext - the service context to be applied (optionally null). Can set the UUID (with the uuid attribute), asset category IDs, asset tag names, and expando bridge attributes for the user.
Returns:
the user
Throws:
com.liferay.portal.kernel.exception.PortalException

verifyEmailAddress

public void verifyEmailAddress(String ticketKey)
                        throws com.liferay.portal.kernel.exception.PortalException
Verifies the email address of the ticket.

Parameters:
ticketKey - the ticket key
Throws:
com.liferay.portal.kernel.exception.PortalException

addDefaultRolesAndTeams

protected void addDefaultRolesAndTeams(long groupId,
                                       long[] userIds)
                                throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

authenticate

protected int authenticate(long companyId,
                           String login,
                           String password,
                           String authType,
                           Map<String,String[]> headerMap,
                           Map<String,String[]> parameterMap,
                           Map<String,Object> resultsMap)
                    throws com.liferay.portal.kernel.exception.PortalException
Attempts to authenticate the user by their login and password, while using the AuthPipeline.

Authentication type specifies what login contains.The valid values are:

Parameters:
companyId - the primary key of the user's company
login - either the user's email address, screen name, or primary key depending on the value of authType
password - the user's password
authType - the type of authentication to perform
headerMap - the header map from the authentication request
parameterMap - the parameter map from the authentication request
resultsMap - the map of authentication results (may be nil). After a successful authentication the user's primary key will be placed under the key userId.
Returns:
the authentication status. This can be Authenticator.FAILURE indicating that the user's credentials are invalid, Authenticator.SUCCESS indicating a successful login, or Authenticator.DNE indicating that a user with that login does not exist.
Throws:
com.liferay.portal.kernel.exception.PortalException
See Also:
AuthPipeline

buildSearchContext

protected com.liferay.portal.kernel.search.SearchContext buildSearchContext(long companyId,
                                                                            String firstName,
                                                                            String middleName,
                                                                            String lastName,
                                                                            String fullName,
                                                                            String screenName,
                                                                            String emailAddress,
                                                                            String street,
                                                                            String city,
                                                                            String zip,
                                                                            String region,
                                                                            String country,
                                                                            int status,
                                                                            LinkedHashMap<String,Object> params,
                                                                            boolean andSearch,
                                                                            int start,
                                                                            int end,
                                                                            com.liferay.portal.kernel.search.Sort[] sorts)

getBirthday

protected Date getBirthday(int birthdayMonth,
                           int birthdayDay,
                           int birthdayYear)
                    throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

getLogin

protected String getLogin(String login)

getSorts

protected com.liferay.portal.kernel.search.Sort[] getSorts(com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.User> obc)

handleAuthenticationFailure

protected int handleAuthenticationFailure(String login,
                                          String authType,
                                          com.liferay.portal.kernel.model.User user,
                                          Map<String,String[]> headerMap,
                                          Map<String,String[]> parameterMap)

isUseCustomSQL

protected boolean isUseCustomSQL(LinkedHashMap<String,Object> params)

isUserAllowedToAuthenticate

protected boolean isUserAllowedToAuthenticate(com.liferay.portal.kernel.model.User user)
                                       throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

notifyUser

protected void notifyUser(com.liferay.portal.kernel.model.User user,
                          String password,
                          com.liferay.portal.kernel.service.ServiceContext serviceContext)

reindex

protected void reindex(long userId)
                throws com.liferay.portal.kernel.search.SearchException
Throws:
com.liferay.portal.kernel.search.SearchException

reindex

protected void reindex(long[] userIds)
                throws com.liferay.portal.kernel.search.SearchException
Throws:
com.liferay.portal.kernel.search.SearchException

reindex

protected void reindex(com.liferay.portal.kernel.model.User user)
                throws com.liferay.portal.kernel.search.SearchException
Throws:
com.liferay.portal.kernel.search.SearchException

resetFailedLoginAttempts

protected void resetFailedLoginAttempts(com.liferay.portal.kernel.model.User user)

resetFailedLoginAttempts

protected void resetFailedLoginAttempts(com.liferay.portal.kernel.model.User user,
                                        boolean forceUpdate)

searchUsers

protected com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.kernel.model.User> searchUsers(com.liferay.portal.kernel.search.SearchContext searchContext)
                                                                                                            throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

sendPasswordNotification

protected void sendPasswordNotification(com.liferay.portal.kernel.model.User user,
                                        long companyId,
                                        String newPassword,
                                        String passwordResetURL,
                                        String fromName,
                                        String fromAddress,
                                        String subject,
                                        String body,
                                        com.liferay.portal.kernel.service.ServiceContext serviceContext)

setEmailAddress

protected void setEmailAddress(com.liferay.portal.kernel.model.User user,
                               String password,
                               String firstName,
                               String middleName,
                               String lastName,
                               String emailAddress)
                        throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

updateGroups

protected void updateGroups(long userId,
                            long[] newGroupIds,
                            com.liferay.portal.kernel.service.ServiceContext serviceContext,
                            boolean indexingEnabled)
                     throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

updateOrganizations

protected void updateOrganizations(long userId,
                                   long[] newOrganizationIds,
                                   boolean indexingEnabled)
                            throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

updateUserGroupRoles

protected void updateUserGroupRoles(com.liferay.portal.kernel.model.User user,
                                    long[] groupIds,
                                    long[] organizationIds,
                                    List<com.liferay.portal.kernel.model.UserGroupRole> userGroupRoles,
                                    List<com.liferay.portal.kernel.model.UserGroupRole> previousUserGroupRoles)
                             throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

validate

protected void validate(long companyId,
                        long userId,
                        boolean autoPassword,
                        String password1,
                        String password2,
                        boolean autoScreenName,
                        String screenName,
                        String emailAddress,
                        String openId,
                        String firstName,
                        String middleName,
                        String lastName,
                        long[] organizationIds,
                        Locale locale)
                 throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

validate

protected void validate(long userId,
                        String screenName,
                        String emailAddress,
                        String openId,
                        String firstName,
                        String middleName,
                        String lastName,
                        String smsSn,
                        Locale locale)
                 throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

validateCompanyMaxUsers

protected void validateCompanyMaxUsers(long companyId)
                                throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

validateEmailAddress

protected void validateEmailAddress(long companyId,
                                    String emailAddress)
                             throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

validateEmailAddress

protected void validateEmailAddress(com.liferay.portal.kernel.model.User user,
                                    String emailAddress1,
                                    String emailAddress2)
                             throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

validateFullName

protected void validateFullName(long companyId,
                                String firstName,
                                String middleName,
                                String lastName,
                                Locale locale)
                         throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

validateGoogleUserId

protected void validateGoogleUserId(long companyId,
                                    long userId,
                                    String googleUserId)
                             throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

validateOpenId

protected void validateOpenId(long companyId,
                              long userId,
                              String openId)
                       throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

validatePassword

protected void validatePassword(long companyId,
                                long userId,
                                String password1,
                                String password2)
                         throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

validateReminderQuery

protected void validateReminderQuery(String question,
                                     String answer)
                              throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

validateScreenName

protected void validateScreenName(long companyId,
                                  long userId,
                                  String screenName)
                           throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

Liferay 7.0-ga1 portal-impl