Interface UserModelEx

    • Method Detail

      • findUsers

        List<UserEx> findUsers​(SearchOptions searchOptions,
                               @NotNull
                               UserModelEx.SORT_BY sortOption,
                               boolean ascending)
        Searches for users with specified keyword in username, name or email. If keyword is empty, then all users returned.
        Parameters:
        searchOptions -
        sortOption -
        ascending -
        Returns:
        unmodifiable collection of users
      • findUsersByVerifiedEmail

        @NotNull
        List<SUser> findUsersByVerifiedEmail​(@NotNull
                                             String verifiedEmail)
        Since:
        2020.2
      • findUserById

        @Nullable
        UserEx findUserById​(long userId)
        Description copied from interface: UserModel
        Searches for a user by id in the current login domain. Login domain is defined by currently selected login module.
        Specified by:
        findUserById in interface UserModel
        Parameters:
        userId - id of the user
        Returns:
        found user or null
      • findUserAccount

        @Nullable
        UserEx findUserAccount​(@Nullable
                               String realm,
                               @NotNull
                               String username)
        Description copied from interface: UserModel
        Searches for a user account with specified realm and username
        Specified by:
        findUserAccount in interface UserModel
        Parameters:
        realm - realm is always ignored. Pass null here.
        username - username
        Returns:
        found user or null
      • atLeastOneUserAccountRegistered

        boolean atLeastOneUserAccountRegistered()
        Returns true if at least one user account exists.
        Returns:
        see above
      • setLicenseKeysManager

        void setLicenseKeysManager​(@NotNull
                                   LicenseKeysManager licKeysManager)
      • createPermissionsRestrictedUser

        UserEx createPermissionsRestrictedUser​(@NotNull
                                               UserEx delegate,
                                               @NotNull
                                               PermissionsHolder permissionsRestrictor)
      • isSpecialUser

        boolean isSpecialUser​(@NotNull
                              User user)
        Returns true if user is guest or root.
        Parameters:
        user -
        Returns:
      • getGuestUser

        @NotNull
        UserEx getGuestUser()
        Description copied from interface: UserModel
        Returns guest user
        Specified by:
        getGuestUser in interface UserModel
        Returns:
        guest user
      • findUsersByAttributeValue

        UserSet<SUser> findUsersByAttributeValue​(String attributeKey,
                                                 String attributeValue,
                                                 boolean caseSensitive)
        Returns UserSet of users having specified attribute.
        Parameters:
        attributeKey - attribute key
        attributeValue - attribute value
        caseSensitive - whether to perform case-sensitive search
        Returns:
        set of users having the attribute with specified key and value