Plugin Directory

Changeset 3805852


Ignore:
Timestamp:
11/16/2026 06:32:54 PM (less than one hour ago)
Author:
wpusermanager
Message:

Update to version 2.10.6 from GitHub

Location:
wp-user-manager
Files:
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-user-manager/tags/2.10.6/includes/actions.php

    r3773561 r3805852  
    650650        $requested_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; // phpcs:ignore
    651651
    652         if ( $requested_url === $login_page || ( $is_wp_login && ( ! empty( $_GET['wpum_override'] ) || ! $wp_login_locked ) ) ) { // phpcs:ignore
     652        // wp-login.php never runs the main query, so its URL can be trusted here.
     653        if ( $is_wp_login && ( $requested_url === $login_page || ! empty( $_GET['wpum_override'] ) || ! $wp_login_locked ) ) { // phpcs:ignore
    653654                return;
    654655        }
    … …  
    673674        }
    674675
     676        $open_urls = array( $login_page );
     677
    675678        if ( wpum_get_option( 'lock_complete_site_allow_register' ) ) {
    676679                $registration_pages   = array();
    677680                $registration_pages[] = get_permalink( wpum_get_core_page_id( 'register' ) );
    678681
    679                 foreach ( apply_filters( 'wpum_registration_pages', $registration_pages ) as $registration_page ) {
    680                         if ( $requested_url === $registration_page ) {
    681                                 return;
    682                         }
    683                 }
    684         }
    685 
    686         foreach ( apply_filters( 'wpum_prevent_entire_site_access_allowed_urls', array() ) as $allowed_url ) {
    687                 if ( $requested_url === $allowed_url ) {
     682                $open_urls = array_merge( $open_urls, (array) apply_filters( 'wpum_registration_pages', $registration_pages ) );
     683        }
     684
     685        $open_urls = array_merge( $open_urls, (array) apply_filters( 'wpum_prevent_entire_site_access_allowed_urls', array() ) );
     686
     687        foreach ( $open_urls as $open_url ) {
     688                if ( $requested_url !== $open_url ) {
     689                        continue;
     690                }
     691
     692                // WordPress also reads query variables from the request body, so a request for an
     693                // open URL can be served other content. Check once the query has run.
     694                if ( ! doing_action( 'wp' ) ) {
     695                        add_action( 'wp', 'wpum_prevent_entire_site', 0 );
     696                        return;
     697                }
     698
     699                if ( wpum_site_lock_query_is_for_url( $open_url ) ) {
    688700                        return;
    689701                }
    … …  
    700712if ( wpum_get_option( 'lock_complete_site' ) ) {
    701713        add_action( 'init', 'wpum_prevent_entire_site', 9 );
     714}
     715
     716/**
     717 * Whether the main query is serving the content at a URL the site lock leaves open,
     718 * rather than content picked by query variables in the request body.
     719 *
     720 * @param string $url An open URL that the request URL matches.
     721 *
     722 * @return bool
     723 */
     724function wpum_site_lock_query_is_for_url( $url ) {
     725        global $wp;
     726
     727        if ( is_feed() ) {
     728                return false;
     729        }
     730
     731        // The URL's own page or post.
     732        $post_id = url_to_postid( $url );
     733        if ( $post_id && is_singular() && get_queried_object_id() === $post_id ) {
     734                return true;
     735        }
     736
     737        // Anything else, such as an archive, is only open if the body set no query variable
     738        // WordPress reads, so the URL alone decided what is served.
     739        $public_query_vars = isset( $wp->public_query_vars ) ? (array) $wp->public_query_vars : array();
     740        foreach ( array_keys( $_POST ) as $key ) { // phpcs:ignore
     741                if ( in_array( $key, $public_query_vars, true ) ) {
     742                        return false;
     743                }
     744        }
     745
     746        return true;
    702747}
    703748
    … …  
    727772}
    728773add_filter( 'rest_pre_dispatch', 'wpum_prevent_entire_site_rest', 10, 3 );
     774
     775/**
     776 * Check access on Carbon Fields' attachment route, which Carbon Fields leaves open to anyone.
     777 *
     778 * The image and file fields use it to preview the chosen file.
     779 *
     780 * @param array $endpoints REST routes and their handlers.
     781 *
     782 * @return array
     783 */
     784function wpum_carbon_fields_rest_endpoints( $endpoints ) {
     785        $route = '/carbon-fields/v1/attachment';
     786
     787        if ( empty( $endpoints[ $route ] ) || ! is_array( $endpoints[ $route ] ) ) {
     788                return $endpoints;
     789        }
     790
     791        foreach ( $endpoints[ $route ] as $key => $handler ) {
     792                // Handlers have numeric keys; the others are route options.
     793                if ( is_numeric( $key ) && is_array( $handler ) ) {
     794                        $endpoints[ $route ][ $key ]['permission_callback'] = 'wpum_carbon_fields_attachment_permission';
     795                }
     796        }
     797
     798        return $endpoints;
     799}
     800add_filter( 'rest_endpoints', 'wpum_carbon_fields_rest_endpoints' );
     801
     802/**
     803 * Whether the current user may read an attachment's details through Carbon Fields.
     804 *
     805 * Reads the same input, in the same way, as the route's handler
     806 * (Carbon Fields' Router::get_attachment_data()): $_GET, not the request's parameters,
     807 * which a JSON body can override.
     808 *
     809 * @return bool
     810 */
     811function wpum_carbon_fields_attachment_permission() {
     812        if ( current_user_can( 'upload_files' ) ) {
     813                return true;
     814        }
     815
     816        if ( ! is_user_logged_in() || ! isset( $_GET['type'], $_GET['value'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     817                return false;
     818        }
     819
     820        // phpcs:disable WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Must match the handler exactly.
     821        $type  = sanitize_text_field( $_GET['type'] );
     822        $value = sanitize_text_field( $_GET['value'] );
     823        // phpcs:enable
     824
     825        $is_url = 'url' === $type;
     826
     827        if ( $is_url ) {
     828                if ( ! class_exists( '\WPUM\Carbon_Fields\Helper\Helper' ) ) {
     829                        return false;
     830                }
     831                $attachment = get_post( \WPUM\Carbon_Fields\Helper\Helper::get_attachment_id( $value ) );
     832        } else {
     833                $attachment = get_post( $value );
     834        }
     835
     836        // A URL that isn't an attachment comes back as it was sent, so it reveals nothing.
     837        if ( ! $attachment ) {
     838                return $is_url;
     839        }
     840
     841        return 'attachment' === $attachment->post_type && current_user_can( 'read_post', $attachment->ID );
     842}
    729843
    730844/**
    … …  
    9021016
    9031017/**
    904  * @param int $user_id
    905  */
    906 function wpum_action_profile_update( $user_id ) {
     1018 * @param int          $user_id
     1019 * @param WP_User|null $old_user_data The user before the save, on profile_update. WordPress may
     1020 *                                    already have replaced the roles by then.
     1021 */
     1022function wpum_action_profile_update( $user_id, $old_user_data = null ) {
    9071023        $allow_multiple_roles = wpum_get_option( 'allow_multiple_user_roles' );
    9081024        if ( ! $allow_multiple_roles ) {
    … …  
    9101026        }
    9111027
    912         if ( isset( $_POST['_wpum_user_roles'] ) && current_user_can( 'promote_user' ) ) { // phpcs:ignore
     1028        if ( isset( $_POST['_wpum_user_roles'] ) && current_user_can( 'promote_user', $user_id ) ) { // phpcs:ignore
    9131029
    9141030                $user = get_user_by( 'ID', $user_id );
    9151031
    916                 $roles = filter_input( INPUT_POST, '_wpum_user_roles' );
    917 
    918                 $wpum_roles = explode( '|', $roles );
    919                 wpum_update_roles( $wpum_roles, $user );
    920         }
    921 }
    922 
    923 add_action( 'profile_update', 'wpum_action_profile_update', 99 );
     1032                $roles = sanitize_text_field( wp_unslash( $_POST['_wpum_user_roles'] ) ); // phpcs:ignore
     1033
     1034                if ( '' === $roles ) {
     1035                        return;
     1036                }
     1037
     1038                if ( ! function_exists( 'get_editable_roles' ) ) {
     1039                        require_once ABSPATH . 'wp-admin/includes/user.php';
     1040                }
     1041
     1042                // Only roles this user may assign are added or removed, so a role above theirs stays as it is.
     1043                $editable_roles = array_keys( get_editable_roles() );
     1044                $old_roles      = $old_user_data instanceof WP_User ? $old_user_data->roles : $user->roles;
     1045                $kept_roles     = array_diff( $old_roles, $editable_roles );
     1046                $wpum_roles     = array_values( array_unique( array_merge( $kept_roles, array_intersect( explode( '|', $roles ), $editable_roles ) ) ) );
     1047
     1048                wpum_update_roles( $wpum_roles, $user, $editable_roles );
     1049        }
     1050}
     1051
     1052add_action( 'profile_update', 'wpum_action_profile_update', 99, 2 );
    9241053if ( is_multisite() ) {
    9251054        add_action( 'add_user_to_blog', 'wpum_action_profile_update', 99 );
  • wp-user-manager/tags/2.10.6/includes/admin/class-wpum-menus.php

    r3749831 r3805852  
    244244                                                $user = wp_get_current_user();
    245245
    246                                                 if ( ! array_intersect( (array) $user->roles, $roles ) ) {
     246                                                if ( ! array_intersect( wpum_get_user_access_roles( $user ), $roles ) ) {
    247247                                                        $visible = false;
    248248                                                }
  • wp-user-manager/tags/2.10.6/includes/forms/class-wpum-form-registration.php

    r3529166 r3805852  
    224224                if ( $form === $this->form_name && isset( $values['register']['role'] ) ) {
    225225                        $role_field     = $values['register']['role'];
    226                         $selected_roles = array_flip( $registration_form->get_setting( 'register_roles' ) );
    227                         if ( ! array_key_exists( $role_field, $selected_roles ) ) {
     226                        $selected_roles = array_flip( (array) $registration_form->get_setting( 'register_roles' ) );
     227                        if ( 'administrator' === $role_field || ! array_key_exists( $role_field, $selected_roles ) ) {
    228228                                return new WP_Error( 'role-validation-error', __( 'Select a valid role from the list.', 'wp-user-manager' ) );
    229229                        }
    … …  
    573573                        // Assign the role set into the registration form.
    574574                        if ( $form->get_setting( 'allow_role_select' ) && isset( $values['register']['role'] ) ) {
    575                                 $user->set_role( $values['register']['role'] );
     575                                $role = $values['register']['role'];
    576576                        } else {
    577                                 $user->set_role( $this->role );
    578                         }
     577                                $role = $this->role;
     578                        }
     579
     580                        // Registration never grants administrator, however the form was set up.
     581                        if ( 'administrator' === $role ) {
     582                                $role = get_option( 'default_role' );
     583                                if ( 'administrator' === $role || ! get_role( $role ) ) {
     584                                        $role = 'subscriber';
     585                                }
     586                        }
     587
     588                        $user->set_role( $role );
    579589
    580590                        $upload_dir = wp_upload_dir()['basedir'];
  • wp-user-manager/tags/2.10.6/includes/forms/wpum-registration-forms-functions.php

    r3757390 r3805852  
    248248                        }
    249249                }
     250
     251                if ( 'register_roles' === $key && is_array( $values[ $key ] ) ) {
     252                        // Visitors choose from these roles, so administrator is never one of them.
     253                        $values[ $key ] = array_values( array_diff( $values[ $key ], array( 'administrator' ) ) );
     254                }
    250255        }
    251256
    … …  
    311316                        }
    312317                }
     318        }
     319
     320        if ( 'register_roles' === $setting['id'] && in_array( 'administrator', (array) $value, true ) ) {
     321                // translators: %s role key
     322                return new WP_Error( 'wpum_registration_form_invalid_role', sprintf( esc_html__( 'The %s role cannot be assigned at registration.', 'wp-user-manager' ), 'administrator' ), array( 'status' => 400 ) );
    313323        }
    314324
  • wp-user-manager/tags/2.10.6/includes/functions.php

    r3777624 r3805852  
    9797        $roles = array();
    9898
    99         $transient = get_transient( 'wpum_get_roles' );
     99        // One cache per list, so a list with the admin role never answers a call without it.
     100        $transient_key = $admin ? 'wpum_get_roles_admin' : 'wpum_get_roles';
     101        $transient     = get_transient( $transient_key );
    100102
    101103        if ( $transient && ! $force ) {
    102104                $roles = $transient;
     105
     106                if ( ! $admin ) {
     107                        // Caches written before the split can still hold the admin role.
     108                        $roles = array_values( wp_list_filter( $roles, array( 'value' => 'administrator' ), 'NOT' ) );
     109                }
    103110        } else {
    104111
    … …  
    118125                        );
    119126                }
    120                 set_transient( 'wpum_get_roles', $roles, DAY_IN_SECONDS );
     127                set_transient( $transient_key, $roles, DAY_IN_SECONDS );
    121128
    122129        }
  • wp-user-manager/tags/2.10.6/includes/integrations/stripe/Account.php

    r3773561 r3805852  
    9999        public function enforce_payment() {
    100100                add_action( 'template_redirect', array( $this, 'unsubscribed_redirect' ) );
     101                add_filter( 'rest_pre_dispatch', array( $this, 'refuse_unpaid_rest_requests' ), 10, 3 );
    101102                add_filter( 'user_has_cap', array( $this, 'restrict_unpaid_capabilities' ), 10, 4 );
    102103                add_filter( 'wpum_user_access_roles', array( $this, 'withhold_unpaid_access_roles' ), 10, 2 );
    … …  
    147148                wp_safe_redirect( $redirect );
    148149                exit;
     150        }
     151
     152        /**
     153         * Refuse REST requests from users who still owe a payment. The front-end
     154         * redirect runs on template_redirect, which REST requests never reach, so
     155         * without this an unpaid account could read the site's content through
     156         * /wp/v2/posts and /wp/v2/pages.
     157         *
     158         * @param mixed            $result  Response to replace the requested version with.
     159         * @param \WP_REST_Server  $server  Server instance.
     160         * @param \WP_REST_Request $request Request used to generate the response.
     161         *
     162         * @return mixed
     163         */
     164        public function refuse_unpaid_rest_requests( $result, $server, $request ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed -- Matches the rest_pre_dispatch filter signature.
     165                if ( null !== $result || ! is_user_logged_in() ) {
     166                        return $result;
     167                }
     168
     169                if ( ! $this->owes_payment( get_current_user_id() ) ) {
     170                        return $result;
     171                }
     172
     173                $allowed_routes = apply_filters( 'wpum_stripe_not_paid_allowed_rest_routes', array( '/wpum/v1/stripe' ) );
     174                if ( in_array( untrailingslashit( $request->get_route() ), $allowed_routes, true ) ) {
     175                        return $result;
     176                }
     177
     178                return new \WP_Error( 'wpum_payment_required', esc_html__( 'Please complete your payment to access this site.', 'wp-user-manager' ), array( 'status' => 403 ) );
    149179        }
    150180
  • wp-user-manager/tags/2.10.6/languages/wp-user-manager.pot

    r3777688 r3805852  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WP User Manager 2.10.5\n"
     5"Project-Id-Version: WP User Manager 2.10.6\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-user-manager\n"
    7 "POT-Creation-Date: 2026-11-01 08:30:18+00:00\n"
     7"POT-Creation-Date: 2026-11-16 18:30:58+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
    … …  
    175175msgstr ""
    176176
    177 #: includes/abstracts/class-wpum-form.php:372 includes/functions.php:689
     177#: includes/abstracts/class-wpum-form.php:372 includes/functions.php:696
    178178#. translators: %1s$ field label %2$s file extension %3$s allowed extensions
    179179#. translators: %1$s: file label %2$s: file type  %3$s: allowed types
    … …  
    293293#: includes/forms/class-wpum-registration-forms-editor.php:157
    294294#: includes/forms/class-wpum-registration-forms-editor.php:563
    295 #: includes/functions.php:814
     295#: includes/functions.php:821
    296296#: includes/integrations/elementor/widgets/class-wpum-elementor-widget.php:74
    297297#: vendor/wp-user-manager/wpum-blocks/includes/classes/Blocks/AccountPage.php:32
    … …  
    323323msgstr ""
    324324
    325 #: includes/actions.php:422 includes/functions.php:822
     325#: includes/actions.php:422 includes/functions.php:829
    326326#: templates/profile-card.php:44
    327327msgid "View Profile"
    … …  
    344344msgstr ""
    345345
    346 #: includes/actions.php:726
     346#: includes/actions.php:771
    347347msgid "You must be logged in to access this site."
    348348msgstr ""
    349349
    350 #: includes/actions.php:748 includes/forms/class-wpum-form-privacy.php:77
    351 #: includes/functions.php:837
     350#: includes/actions.php:862 includes/forms/class-wpum-form-privacy.php:77
     351#: includes/functions.php:844
    352352msgid "Profile Privacy"
    353353msgstr ""
    354354
    355 #: includes/actions.php:750
     355#: includes/actions.php:864
    356356msgid "Hide profile from guests"
    357357msgstr ""
    358358
    359 #: includes/actions.php:751
     359#: includes/actions.php:865
    360360msgid "Hide this profile from guests. Overrides the global profile options."
    361361msgstr ""
    362362
    363 #: includes/actions.php:752
     363#: includes/actions.php:866
    364364msgid "Hide profile from members"
    365365msgstr ""
    366366
    367 #: includes/actions.php:753
     367#: includes/actions.php:867
    368368msgid "Hide this profile from members. Overrides the global profile options."
    369369msgstr ""
    370370
    371 #: includes/actions.php:787
     371#: includes/actions.php:901
    372372#: includes/directories/class-wpum-directories-editor.php:311
    373373#: includes/fields/types/class-wpum-field-userrole.php:72
    … …  
    375375msgstr ""
    376376
    377 #: includes/actions.php:793
     377#: includes/actions.php:907
    378378msgid "Select one or more roles for this user."
    379379msgstr ""
    380380
    381 #: includes/actions.php:1366 includes/shortcodes/shortcodes.php:199
     381#: includes/actions.php:1495 includes/shortcodes/shortcodes.php:199
    382382msgid ""
    383383"Registration complete. We have sent you a confirmation email with your "
    … …  
    17731773#: includes/fields/types/class-wpum-field-email.php:35
    17741774#: includes/forms/class-wpum-form-password-recovery.php:108
    1775 #: includes/functions.php:291
     1775#: includes/functions.php:298
    17761776msgid "Email"
    17771777msgstr ""
    … …  
    18521852#: includes/fields/class-wpum-field.php:359
    18531853#: includes/forms/class-wpum-form-password-recovery.php:105
    1854 #: includes/functions.php:287
     1854#: includes/functions.php:294
    18551855msgid "Username"
    18561856msgstr ""
    … …  
    24152415#: includes/fields/types/class-wpum-field-password.php:35
    24162416#: includes/forms/class-wpum-form-login.php:104
    2417 #: includes/forms/class-wpum-form-password.php:99 includes/functions.php:818
     2417#: includes/forms/class-wpum-form-password.php:99 includes/functions.php:825
    24182418msgid "Password"
    24192419msgstr ""
    … …  
    25652565
    25662566#: includes/fields/wpum-fields-functions.php:903
    2567 #: includes/forms/wpum-registration-forms-functions.php:331
     2567#: includes/forms/wpum-registration-forms-functions.php:341
    25682568#. translators: %1$s value, %2$s setting key
    25692569#. translators: %1$s value, %2$s setting ID
    … …  
    26272627
    26282628#: includes/forms/class-wpum-form-password-recovery.php:103
    2629 #: includes/functions.php:83 includes/functions.php:293
     2629#: includes/functions.php:83 includes/functions.php:300
    26302630msgid "Username or Email Address"
    26312631msgstr ""
    … …  
    29632963msgstr ""
    29642964
    2965 #: includes/forms/wpum-registration-forms-functions.php:310
     2965#: includes/forms/wpum-registration-forms-functions.php:315
     2966#: includes/forms/wpum-registration-forms-functions.php:322
    29662967#. translators: %s role key
    29672968msgid "The %s role cannot be assigned at registration."
    … …  
    29802981msgstr ""
    29812982
    2982 #: includes/functions.php:180
     2983#: includes/functions.php:187
    29832984#. translators: %s list of core pages
    29842985msgid "Unknown page. Use one of: %s"
    29852986msgstr ""
    29862987
    2987 #: includes/functions.php:194
     2988#: includes/functions.php:201
    29882989msgid "The page must be a published or private page."
    29892990msgstr ""
    29902991
    2991 #: includes/functions.php:217
     2992#: includes/functions.php:224
    29922993msgid "The page could not be saved."
    29932994msgstr ""
    29942995
    2995 #: includes/functions.php:683
     2996#: includes/functions.php:690
    29962997msgid "Sorry, you are not allowed to upload this file type."
    29972998msgstr ""
    29982999
    2999 #: includes/functions.php:692
     3000#: includes/functions.php:699
    30003001#. translators: %s: allowed file types
    30013002msgid "Uploaded files need to be one of the following file types: %s"
    30023003msgstr ""
    30033004
    3004 #: includes/functions.php:826 includes/shortcodes/shortcodes.php:147
     3005#: includes/functions.php:833 includes/shortcodes/shortcodes.php:147
    30053006#: templates/profile-card.php:47 templates/user-overview.php:43
    30063007#: vendor/wp-user-manager/wpum-blocks/includes/classes/Blocks/LogoutLink.php:50
    … …  
    30083009msgstr ""
    30093010
    3010 #: includes/functions.php:1044
     3011#: includes/functions.php:1051
    30113012msgid "About"
    30123013msgstr ""
    30133014
    3014 #: includes/functions.php:1048
     3015#: includes/functions.php:1055
    30153016msgid "Posts"
    30163017msgstr ""
    30173018
    3018 #: includes/functions.php:1052
     3019#: includes/functions.php:1059
    30193020msgid "Comments"
    30203021msgstr ""
    … …  
    32363237msgstr ""
    32373238
    3238 #: includes/integrations/stripe/Account.php:257
    3239 #: includes/integrations/stripe/Account.php:272
     3239#: includes/integrations/stripe/Account.php:178
     3240msgid "Please complete your payment to access this site."
     3241msgstr ""
     3242
     3243#: includes/integrations/stripe/Account.php:287
     3244#: includes/integrations/stripe/Account.php:302
    32403245msgid "Billing"
    32413246msgstr ""
    32423247
    3243 #: includes/integrations/stripe/Account.php:286
     3248#: includes/integrations/stripe/Account.php:316
    32443249msgid ""
    32453250"Your subscription has been changed to a plan that isn't available for your "
    … …  
    32473252msgstr ""
    32483253
    3249 #: includes/integrations/stripe/Account.php:290
     3254#: includes/integrations/stripe/Account.php:320
    32503255msgid "An active subscription is required."
    32513256msgstr ""
    32523257
    3253 #: includes/integrations/stripe/Account.php:296
     3258#: includes/integrations/stripe/Account.php:326
    32543259msgid "Payment is required for access to the site."
    32553260msgstr ""
    32563261
    3257 #: includes/integrations/stripe/Account.php:303
     3262#: includes/integrations/stripe/Account.php:333
    32583263#. translators: %s the datetime the subscription will cancel.
    32593264msgid "Your plan will be canceled on <strong>%s</strong>."
    32603265msgstr ""
    32613266
    3262 #: includes/integrations/stripe/Account.php:423
    3263 #: includes/integrations/stripe/Account.php:456
     3267#: includes/integrations/stripe/Account.php:453
     3268#: includes/integrations/stripe/Account.php:486
    32643269msgid "Unknown Error"
    32653270msgstr ""
    32663271
    3267 #: includes/integrations/stripe/Account.php:429
     3272#: includes/integrations/stripe/Account.php:459
    32683273msgid "No subscription"
    32693274msgstr ""
    32703275
    3271 #: includes/integrations/stripe/Account.php:435
     3276#: includes/integrations/stripe/Account.php:465
    32723277msgid "Error creating Stripe session"
    32733278msgstr ""
    32743279
    3275 #: includes/integrations/stripe/Account.php:449
    3276 #: includes/integrations/stripe/Account.php:463
     3280#: includes/integrations/stripe/Account.php:479
     3281#: includes/integrations/stripe/Account.php:493
    32773282msgid "Unknown plan"
    32783283msgstr ""
    32793284
    3280 #: includes/integrations/stripe/Account.php:467
     3285#: includes/integrations/stripe/Account.php:497
    32813286#: includes/integrations/stripe/Registration.php:342
    32823287msgid "This plan is no longer available. Please contact the site owner."
    32833288msgstr ""
    32843289
    3285 #: includes/integrations/stripe/Account.php:477
     3290#: includes/integrations/stripe/Account.php:507
    32863291#: includes/integrations/stripe/Registration.php:411
    32873292msgid "There has been an issue when registering, please contact the site owner"
    32883293msgstr ""
    32893294
    3290 #: includes/integrations/stripe/Account.php:525
     3295#: includes/integrations/stripe/Account.php:555
    32913296msgid "Payment successfully completed."
    32923297msgstr ""
    … …  
    49804985msgstr ""
    49814986
    4982 #: includes/functions.php:887
     4987#: includes/functions.php:894
    49834988msgctxt "Permalink structure"
    49844989msgid "Display user ID"
    49854990msgstr ""
    49864991
    4987 #: includes/functions.php:892
     4992#: includes/functions.php:899
    49884993msgctxt "Permalink structure"
    49894994msgid "Display username"
    49904995msgstr ""
    49914996
    4992 #: includes/functions.php:897
     4997#: includes/functions.php:904
    49934998msgctxt "Permalink structure"
    49944999msgid "Display nickname"
    49955000msgstr ""
    49965001
    4997 #: includes/functions.php:893
     5002#: includes/functions.php:900
    49985003msgctxt "Example of permalink setting"
    49995004msgid "username"
    50005005msgstr ""
    50015006
    5002 #: includes/functions.php:898
     5007#: includes/functions.php:905
    50035008msgctxt "Example of permalink setting"
    50045009msgid "nickname"
  • wp-user-manager/tags/2.10.6/readme.txt

    r3777688 r3805852  
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
    11 Stable Tag: 2.10.5
     11Stable Tag: 2.10.6
    1212
    1313Registration forms, a frontend login form, user profiles and a member directory for WordPress. Add Stripe payments and content restriction.
    … …  
    172172== Changelog ==
    173173
     174= 2.10.6 (16th November 2026) =
     175
     176- Security: Accounts that still owe a Stripe payment can't read the site's content through the REST API (thanks to HeeDong Cho for responsible disclosure)
     177- Security: Role-restricted blocks, widgets and menu items stay hidden until the Stripe payment is made (thanks to elba.code and Belladonnask for responsible disclosure)
     178- Security: Posting query variables to the login or registration page no longer gets past "Prevent site access to visitors" (thanks to Malvin Valerian Gultom for responsible disclosure)
     179- Security: The bundled Carbon Fields attachment route only returns attachments the user can see (thanks to Belladonnask for responsible disclosure)
     180- Security: Saving the multiple roles field only changes roles the editing user can assign
     181- Fix: Registration never assigns the Administrator role, and role lists that hide it no longer show it
     182
    174183= 2.10.5 (1st November 2026) =
    175184
  • wp-user-manager/tags/2.10.6/vendor-dist/composer/installed.json

    r3468506 r3805852  
    15601560        {
    15611561            "name": "wp-user-manager\/wpum-blocks",
    1562             "version": "1.15",
    1563             "version_normalized": "1.15.0.0",
     1562            "version": "1.16",
     1563            "version_normalized": "1.16.0.0",
    15641564            "source": {
    15651565                "type": "git",
    15661566                "url": "https:\/\/github.com\/WPUserManager\/wpum-blocks.git",
    1567                 "reference": "fc3d01fe0baa2fb0fdf6a0f4cff30fc40bb1dbba"
    1568             },
    1569             "dist": {
    1570                 "type": "zip",
    1571                 "url": "https:\/\/api.github.com\/repos\/WPUserManager\/wpum-blocks\/zipball\/fc3d01fe0baa2fb0fdf6a0f4cff30fc40bb1dbba",
    1572                 "reference": "fc3d01fe0baa2fb0fdf6a0f4cff30fc40bb1dbba",
     1567                "reference": "78f6530be071a36de78892e862fa5a713318f849"
     1568            },
     1569            "dist": {
     1570                "type": "zip",
     1571                "url": "https:\/\/api.github.com\/repos\/WPUserManager\/wpum-blocks\/zipball\/78f6530be071a36de78892e862fa5a713318f849",
     1572                "reference": "78f6530be071a36de78892e862fa5a713318f849",
    15731573                "shasum": ""
    15741574            },
    … …  
    15771577                "php": ">=5.6"
    15781578            },
    1579             "time": "2023-11-18T15:05:09+00:00",
     1579            "time": "2026-11-03T11:41:39+00:00",
    15801580            "type": "library",
    15811581            "installation-source": "dist",
    … …  
    16051605            "support": {
    16061606                "issues": "https:\/\/github.com\/WPUserManager\/wpum-blocks\/issues",
    1607                 "source": "https:\/\/github.com\/WPUserManager\/wpum-blocks\/tree\/1.15"
     1607                "source": "https:\/\/github.com\/WPUserManager\/wpum-blocks\/tree\/1.16"
    16081608            },
    16091609            "install-path": "..\/wp-user-manager\/wpum-blocks"
  • wp-user-manager/tags/2.10.6/vendor-dist/composer/installed.php

    r3777688 r3805852  
    33namespace WPUM;
    44
    5 return array('root' => array('name' => 'wp-user-manager/wp-user-manager', 'pretty_version' => 'v2.10.5', 'version' => '2.10.5.0', 'reference' => 'fbd84af7f889cb673af0851cabdd8c4739412281', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('brain/cortex' => array('pretty_version' => 'dev-refactoring-fastroute', 'version' => 'dev-refactoring-fastroute', 'reference' => '86bec053ec2c4d2e4c75af64e0cee951d9b0054b', 'type' => 'library', 'install_path' => __DIR__ . '/../brain/cortex', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'composer/installers' => array('pretty_version' => '1.x-dev', 'version' => '1.9999999.9999999.9999999-dev', 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/./installers', 'aliases' => array(), 'dev_requirement' => \false), 'dompdf/dompdf' => array('pretty_version' => 'v2.0.2', 'version' => '2.0.2.0', 'reference' => 'ad4c631bf8897fc1ca7b566468a969cfd71a558a', 'type' => 'library', 'install_path' => __DIR__ . '/../dompdf/dompdf', 'aliases' => array(), 'dev_requirement' => \false), 'gamajo/template-loader' => array('pretty_version' => '1.3.1', 'version' => '1.3.1.0', 'reference' => 'fa92a37b780d945463f7fea328dce14933558752', 'type' => 'library', 'install_path' => __DIR__ . '/../gamajo/template-loader', 'aliases' => array(), 'dev_requirement' => \false), 'htmlburger/carbon-fields' => array('pretty_version' => 'v3.6.9', 'version' => '3.6.9.0', 'reference' => 'f82e80e3e3469d6e86cc17a8950b918ad448a059', 'type' => 'library', 'install_path' => __DIR__ . '/../htmlburger/carbon-fields', 'aliases' => array(), 'dev_requirement' => \false), 'masterminds/html5' => array('pretty_version' => '2.7.6', 'version' => '2.7.6.0', 'reference' => '897eb517a343a2281f11bc5556d6548db7d93947', 'type' => 'library', 'install_path' => __DIR__ . '/../masterminds/html5', 'aliases' => array(), 'dev_requirement' => \false), 'nesbot/carbon' => array('pretty_version' => '2.66.0', 'version' => '2.66.0.0', 'reference' => '496712849902241f04902033b0441b269effe001', 'type' => 'library', 'install_path' => __DIR__ . '/../nesbot/carbon', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/fast-route' => array('pretty_version' => 'v0.7.0', 'version' => '0.7.0.0', 'reference' => '8164b4a0d8afde4eae5f1bfc39084972ba23ad36', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/fast-route', 'aliases' => array(), 'dev_requirement' => \false), 'phenx/php-font-lib' => array('pretty_version' => '0.5.4', 'version' => '0.5.4.0', 'reference' => 'dd448ad1ce34c63d09baccd05415e361300c35b4', 'type' => 'library', 'install_path' => __DIR__ . '/../phenx/php-font-lib', 'aliases' => array(), 'dev_requirement' => \false), 'phenx/php-svg-lib' => array('pretty_version' => '0.5.0', 'version' => '0.5.0.0', 'reference' => '76876c6cf3080bcb6f249d7d59705108166a6685', 'type' => 'library', 'install_path' => __DIR__ . '/../phenx/php-svg-lib', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-message' => array('pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'dev_requirement' => \false), 'roundcube/plugin-installer' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'sabberworm/php-css-parser' => array('pretty_version' => '8.4.0', 'version' => '8.4.0.0', 'reference' => 'e41d2140031d533348b2192a83f02d8dd8a71d30', 'type' => 'library', 'install_path' => __DIR__ . '/../sabberworm/php-css-parser', 'aliases' => array(), 'dev_requirement' => \false), 'shama/baton' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'stripe/stripe-php' => array('pretty_version' => 'v10.5.0', 'version' => '10.5.0.0', 'reference' => '331415b232d60d7c0449de7bde4cb7d4fedf982e', 'type' => 'library', 'install_path' => __DIR__ . '/../stripe/stripe-php', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => 'cfa0ae98841b9e461207c13ab093d76b0fa7bace', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation' => array('pretty_version' => 'v5.4.11', 'version' => '5.4.11.0', 'reference' => '7a1a8f6bbff269f434a83343a0a5d36a4f8cfa21', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'reference' => '136b19dd05cdf0709db6537d058bcab6dd6e2dbe', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '2.3')), 'wearerequired/wp-requirements-check' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => '82b8a6c4b953f59e7e534df2d4287e34af950812', 'type' => 'library', 'install_path' => __DIR__ . '/../wearerequired/wp-requirements-check', 'aliases' => array(), 'dev_requirement' => \false), 'wp-user-manager/wp-notices' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => '5498f209c6667e88e944194a93a50f9ffc25ea24', 'type' => 'library', 'install_path' => __DIR__ . '/../wp-user-manager/wp-notices', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'wp-user-manager/wp-optionskit' => array('pretty_version' => '1.1.2', 'version' => '1.1.2.0', 'reference' => '6253bda447991733bf8e19cb2123b41c666f3d62', 'type' => 'library', 'install_path' => __DIR__ . '/../wp-user-manager/wp-optionskit', 'aliases' => array(), 'dev_requirement' => \false), 'wp-user-manager/wp-user-manager' => array('pretty_version' => 'v2.10.5', 'version' => '2.10.5.0', 'reference' => 'fbd84af7f889cb673af0851cabdd8c4739412281', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'wp-user-manager/wpum-blocks' => array('pretty_version' => '1.15', 'version' => '1.15.0.0', 'reference' => 'fc3d01fe0baa2fb0fdf6a0f4cff30fc40bb1dbba', 'type' => 'library', 'install_path' => __DIR__ . '/../wp-user-manager/wpum-blocks', 'aliases' => array(), 'dev_requirement' => \false), 'wpbp/widgets-helper' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => '5547acaaf60b856b0025cdf44e3831e0f3202929', 'type' => 'library', 'install_path' => __DIR__ . '/../wpbp/widgets-helper', 'aliases' => array(), 'dev_requirement' => \false)));
     5return array('root' => array('name' => 'wp-user-manager/wp-user-manager', 'pretty_version' => 'v2.10.6', 'version' => '2.10.6.0', 'reference' => '37ef32c6308bfa1a5860e99302189e82dc1ab8b3', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('brain/cortex' => array('pretty_version' => 'dev-refactoring-fastroute', 'version' => 'dev-refactoring-fastroute', 'reference' => '86bec053ec2c4d2e4c75af64e0cee951d9b0054b', 'type' => 'library', 'install_path' => __DIR__ . '/../brain/cortex', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'composer/installers' => array('pretty_version' => '1.x-dev', 'version' => '1.9999999.9999999.9999999-dev', 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/./installers', 'aliases' => array(), 'dev_requirement' => \false), 'dompdf/dompdf' => array('pretty_version' => 'v2.0.2', 'version' => '2.0.2.0', 'reference' => 'ad4c631bf8897fc1ca7b566468a969cfd71a558a', 'type' => 'library', 'install_path' => __DIR__ . '/../dompdf/dompdf', 'aliases' => array(), 'dev_requirement' => \false), 'gamajo/template-loader' => array('pretty_version' => '1.3.1', 'version' => '1.3.1.0', 'reference' => 'fa92a37b780d945463f7fea328dce14933558752', 'type' => 'library', 'install_path' => __DIR__ . '/../gamajo/template-loader', 'aliases' => array(), 'dev_requirement' => \false), 'htmlburger/carbon-fields' => array('pretty_version' => 'v3.6.9', 'version' => '3.6.9.0', 'reference' => 'f82e80e3e3469d6e86cc17a8950b918ad448a059', 'type' => 'library', 'install_path' => __DIR__ . '/../htmlburger/carbon-fields', 'aliases' => array(), 'dev_requirement' => \false), 'masterminds/html5' => array('pretty_version' => '2.7.6', 'version' => '2.7.6.0', 'reference' => '897eb517a343a2281f11bc5556d6548db7d93947', 'type' => 'library', 'install_path' => __DIR__ . '/../masterminds/html5', 'aliases' => array(), 'dev_requirement' => \false), 'nesbot/carbon' => array('pretty_version' => '2.66.0', 'version' => '2.66.0.0', 'reference' => '496712849902241f04902033b0441b269effe001', 'type' => 'library', 'install_path' => __DIR__ . '/../nesbot/carbon', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/fast-route' => array('pretty_version' => 'v0.7.0', 'version' => '0.7.0.0', 'reference' => '8164b4a0d8afde4eae5f1bfc39084972ba23ad36', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/fast-route', 'aliases' => array(), 'dev_requirement' => \false), 'phenx/php-font-lib' => array('pretty_version' => '0.5.4', 'version' => '0.5.4.0', 'reference' => 'dd448ad1ce34c63d09baccd05415e361300c35b4', 'type' => 'library', 'install_path' => __DIR__ . '/../phenx/php-font-lib', 'aliases' => array(), 'dev_requirement' => \false), 'phenx/php-svg-lib' => array('pretty_version' => '0.5.0', 'version' => '0.5.0.0', 'reference' => '76876c6cf3080bcb6f249d7d59705108166a6685', 'type' => 'library', 'install_path' => __DIR__ . '/../phenx/php-svg-lib', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-message' => array('pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'dev_requirement' => \false), 'roundcube/plugin-installer' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'sabberworm/php-css-parser' => array('pretty_version' => '8.4.0', 'version' => '8.4.0.0', 'reference' => 'e41d2140031d533348b2192a83f02d8dd8a71d30', 'type' => 'library', 'install_path' => __DIR__ . '/../sabberworm/php-css-parser', 'aliases' => array(), 'dev_requirement' => \false), 'shama/baton' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'stripe/stripe-php' => array('pretty_version' => 'v10.5.0', 'version' => '10.5.0.0', 'reference' => '331415b232d60d7c0449de7bde4cb7d4fedf982e', 'type' => 'library', 'install_path' => __DIR__ . '/../stripe/stripe-php', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => 'cfa0ae98841b9e461207c13ab093d76b0fa7bace', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation' => array('pretty_version' => 'v5.4.11', 'version' => '5.4.11.0', 'reference' => '7a1a8f6bbff269f434a83343a0a5d36a4f8cfa21', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'reference' => '136b19dd05cdf0709db6537d058bcab6dd6e2dbe', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '2.3')), 'wearerequired/wp-requirements-check' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => '82b8a6c4b953f59e7e534df2d4287e34af950812', 'type' => 'library', 'install_path' => __DIR__ . '/../wearerequired/wp-requirements-check', 'aliases' => array(), 'dev_requirement' => \false), 'wp-user-manager/wp-notices' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => '5498f209c6667e88e944194a93a50f9ffc25ea24', 'type' => 'library', 'install_path' => __DIR__ . '/../wp-user-manager/wp-notices', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'wp-user-manager/wp-optionskit' => array('pretty_version' => '1.1.2', 'version' => '1.1.2.0', 'reference' => '6253bda447991733bf8e19cb2123b41c666f3d62', 'type' => 'library', 'install_path' => __DIR__ . '/../wp-user-manager/wp-optionskit', 'aliases' => array(), 'dev_requirement' => \false), 'wp-user-manager/wp-user-manager' => array('pretty_version' => 'v2.10.6', 'version' => '2.10.6.0', 'reference' => '37ef32c6308bfa1a5860e99302189e82dc1ab8b3', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'wp-user-manager/wpum-blocks' => array('pretty_version' => '1.16', 'version' => '1.16.0.0', 'reference' => '78f6530be071a36de78892e862fa5a713318f849', 'type' => 'library', 'install_path' => __DIR__ . '/../wp-user-manager/wpum-blocks', 'aliases' => array(), 'dev_requirement' => \false), 'wpbp/widgets-helper' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => '5547acaaf60b856b0025cdf44e3831e0f3202929', 'type' => 'library', 'install_path' => __DIR__ . '/../wpbp/widgets-helper', 'aliases' => array(), 'dev_requirement' => \false)));
  • wp-user-manager/tags/2.10.6/vendor-dist/wp-user-manager/wpum-blocks/blocks-loader.php

    r2998234 r3805852  
    128128            $allowed_roles = \array_map('trim', $allowed_roles);
    129129            $current_user = wp_get_current_user();
    130             if (is_user_logged_in() && \array_intersect($current_user->roles, $allowed_roles)) {
     130            if (is_user_logged_in() && \array_intersect(wpum_get_user_access_roles($current_user), $allowed_roles)) {
    131131                return $block_content;
    132132            }
    … …  
    215215            $allowed_roles = \array_map('trim', $allowed_roles);
    216216            $current_user = wp_get_current_user();
    217             if (is_user_logged_in() && \array_intersect($current_user->roles, $allowed_roles)) {
     217            if (is_user_logged_in() && \array_intersect(wpum_get_user_access_roles($current_user), $allowed_roles)) {
    218218                return $instance;
    219219            }
  • wp-user-manager/tags/2.10.6/wp-user-manager.php

    r3777688 r3805852  
    44 * Plugin URI:  https://wpusermanager.com
    55 * Description: Beautifully simple user profile directories with frontend login, registration and account customization. WP User Manager is the best solution to manage your community and your users for WordPress.
    6  * Version:     2.10.5
     6 * Version:     2.10.6
    77 * Requires PHP: 7.4
    88 * Author:      WP User Manager
    … …  
    2222        require_once __DIR__ . '/includes/class-wp-user-manager.php';
    2323
    24         return WP_User_Manager::instance( __FILE__, '2.10.5' );
     24        return WP_User_Manager::instance( __FILE__, '2.10.6' );
    2525}
    2626
  • wp-user-manager/trunk/includes/actions.php

    r3773561 r3805852  
    650650        $requested_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; // phpcs:ignore
    651651
    652         if ( $requested_url === $login_page || ( $is_wp_login && ( ! empty( $_GET['wpum_override'] ) || ! $wp_login_locked ) ) ) { // phpcs:ignore
     652        // wp-login.php never runs the main query, so its URL can be trusted here.
     653        if ( $is_wp_login && ( $requested_url === $login_page || ! empty( $_GET['wpum_override'] ) || ! $wp_login_locked ) ) { // phpcs:ignore
    653654                return;
    654655        }
    … …  
    673674        }
    674675
     676        $open_urls = array( $login_page );
     677
    675678        if ( wpum_get_option( 'lock_complete_site_allow_register' ) ) {
    676679                $registration_pages   = array();
    677680                $registration_pages[] = get_permalink( wpum_get_core_page_id( 'register' ) );
    678681
    679                 foreach ( apply_filters( 'wpum_registration_pages', $registration_pages ) as $registration_page ) {
    680                         if ( $requested_url === $registration_page ) {
    681                                 return;
    682                         }
    683                 }
    684         }
    685 
    686         foreach ( apply_filters( 'wpum_prevent_entire_site_access_allowed_urls', array() ) as $allowed_url ) {
    687                 if ( $requested_url === $allowed_url ) {
     682                $open_urls = array_merge( $open_urls, (array) apply_filters( 'wpum_registration_pages', $registration_pages ) );
     683        }
     684
     685        $open_urls = array_merge( $open_urls, (array) apply_filters( 'wpum_prevent_entire_site_access_allowed_urls', array() ) );
     686
     687        foreach ( $open_urls as $open_url ) {
     688                if ( $requested_url !== $open_url ) {
     689                        continue;
     690                }
     691
     692                // WordPress also reads query variables from the request body, so a request for an
     693                // open URL can be served other content. Check once the query has run.
     694                if ( ! doing_action( 'wp' ) ) {
     695                        add_action( 'wp', 'wpum_prevent_entire_site', 0 );
     696                        return;
     697                }
     698
     699                if ( wpum_site_lock_query_is_for_url( $open_url ) ) {
    688700                        return;
    689701                }
    … …  
    700712if ( wpum_get_option( 'lock_complete_site' ) ) {
    701713        add_action( 'init', 'wpum_prevent_entire_site', 9 );
     714}
     715
     716/**
     717 * Whether the main query is serving the content at a URL the site lock leaves open,
     718 * rather than content picked by query variables in the request body.
     719 *
     720 * @param string $url An open URL that the request URL matches.
     721 *
     722 * @return bool
     723 */
     724function wpum_site_lock_query_is_for_url( $url ) {
     725        global $wp;
     726
     727        if ( is_feed() ) {
     728                return false;
     729        }
     730
     731        // The URL's own page or post.
     732        $post_id = url_to_postid( $url );
     733        if ( $post_id && is_singular() && get_queried_object_id() === $post_id ) {
     734                return true;
     735        }
     736
     737        // Anything else, such as an archive, is only open if the body set no query variable
     738        // WordPress reads, so the URL alone decided what is served.
     739        $public_query_vars = isset( $wp->public_query_vars ) ? (array) $wp->public_query_vars : array();
     740        foreach ( array_keys( $_POST ) as $key ) { // phpcs:ignore
     741                if ( in_array( $key, $public_query_vars, true ) ) {
     742                        return false;
     743                }
     744        }
     745
     746        return true;
    702747}
    703748
    … …  
    727772}
    728773add_filter( 'rest_pre_dispatch', 'wpum_prevent_entire_site_rest', 10, 3 );
     774
     775/**
     776 * Check access on Carbon Fields' attachment route, which Carbon Fields leaves open to anyone.
     777 *
     778 * The image and file fields use it to preview the chosen file.
     779 *
     780 * @param array $endpoints REST routes and their handlers.
     781 *
     782 * @return array
     783 */
     784function wpum_carbon_fields_rest_endpoints( $endpoints ) {
     785        $route = '/carbon-fields/v1/attachment';
     786
     787        if ( empty( $endpoints[ $route ] ) || ! is_array( $endpoints[ $route ] ) ) {
     788                return $endpoints;
     789        }
     790
     791        foreach ( $endpoints[ $route ] as $key => $handler ) {
     792                // Handlers have numeric keys; the others are route options.
     793                if ( is_numeric( $key ) && is_array( $handler ) ) {
     794                        $endpoints[ $route ][ $key ]['permission_callback'] = 'wpum_carbon_fields_attachment_permission';
     795                }
     796        }
     797
     798        return $endpoints;
     799}
     800add_filter( 'rest_endpoints', 'wpum_carbon_fields_rest_endpoints' );
     801
     802/**
     803 * Whether the current user may read an attachment's details through Carbon Fields.
     804 *
     805 * Reads the same input, in the same way, as the route's handler
     806 * (Carbon Fields' Router::get_attachment_data()): $_GET, not the request's parameters,
     807 * which a JSON body can override.
     808 *
     809 * @return bool
     810 */
     811function wpum_carbon_fields_attachment_permission() {
     812        if ( current_user_can( 'upload_files' ) ) {
     813                return true;
     814        }
     815
     816        if ( ! is_user_logged_in() || ! isset( $_GET['type'], $_GET['value'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     817                return false;
     818        }
     819
     820        // phpcs:disable WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Must match the handler exactly.
     821        $type  = sanitize_text_field( $_GET['type'] );
     822        $value = sanitize_text_field( $_GET['value'] );
     823        // phpcs:enable
     824
     825        $is_url = 'url' === $type;
     826
     827        if ( $is_url ) {
     828                if ( ! class_exists( '\WPUM\Carbon_Fields\Helper\Helper' ) ) {
     829                        return false;
     830                }
     831                $attachment = get_post( \WPUM\Carbon_Fields\Helper\Helper::get_attachment_id( $value ) );
     832        } else {
     833                $attachment = get_post( $value );
     834        }
     835
     836        // A URL that isn't an attachment comes back as it was sent, so it reveals nothing.
     837        if ( ! $attachment ) {
     838                return $is_url;
     839        }
     840
     841        return 'attachment' === $attachment->post_type && current_user_can( 'read_post', $attachment->ID );
     842}
    729843
    730844/**
    … …  
    9021016
    9031017/**
    904  * @param int $user_id
    905  */
    906 function wpum_action_profile_update( $user_id ) {
     1018 * @param int          $user_id
     1019 * @param WP_User|null $old_user_data The user before the save, on profile_update. WordPress may
     1020 *                                    already have replaced the roles by then.
     1021 */
     1022function wpum_action_profile_update( $user_id, $old_user_data = null ) {
    9071023        $allow_multiple_roles = wpum_get_option( 'allow_multiple_user_roles' );
    9081024        if ( ! $allow_multiple_roles ) {
    … …  
    9101026        }
    9111027
    912         if ( isset( $_POST['_wpum_user_roles'] ) && current_user_can( 'promote_user' ) ) { // phpcs:ignore
     1028        if ( isset( $_POST['_wpum_user_roles'] ) && current_user_can( 'promote_user', $user_id ) ) { // phpcs:ignore
    9131029
    9141030                $user = get_user_by( 'ID', $user_id );
    9151031
    916                 $roles = filter_input( INPUT_POST, '_wpum_user_roles' );
    917 
    918                 $wpum_roles = explode( '|', $roles );
    919                 wpum_update_roles( $wpum_roles, $user );
    920         }
    921 }
    922 
    923 add_action( 'profile_update', 'wpum_action_profile_update', 99 );
     1032                $roles = sanitize_text_field( wp_unslash( $_POST['_wpum_user_roles'] ) ); // phpcs:ignore
     1033
     1034                if ( '' === $roles ) {
     1035                        return;
     1036                }
     1037
     1038                if ( ! function_exists( 'get_editable_roles' ) ) {
     1039                        require_once ABSPATH . 'wp-admin/includes/user.php';
     1040                }
     1041
     1042                // Only roles this user may assign are added or removed, so a role above theirs stays as it is.
     1043                $editable_roles = array_keys( get_editable_roles() );
     1044                $old_roles      = $old_user_data instanceof WP_User ? $old_user_data->roles : $user->roles;
     1045                $kept_roles     = array_diff( $old_roles, $editable_roles );
     1046                $wpum_roles     = array_values( array_unique( array_merge( $kept_roles, array_intersect( explode( '|', $roles ), $editable_roles ) ) ) );
     1047
     1048                wpum_update_roles( $wpum_roles, $user, $editable_roles );
     1049        }
     1050}
     1051
     1052add_action( 'profile_update', 'wpum_action_profile_update', 99, 2 );
    9241053if ( is_multisite() ) {
    9251054        add_action( 'add_user_to_blog', 'wpum_action_profile_update', 99 );
  • wp-user-manager/trunk/includes/admin/class-wpum-menus.php

    r3749831 r3805852  
    244244                                                $user = wp_get_current_user();
    245245
    246                                                 if ( ! array_intersect( (array) $user->roles, $roles ) ) {
     246                                                if ( ! array_intersect( wpum_get_user_access_roles( $user ), $roles ) ) {
    247247                                                        $visible = false;
    248248                                                }
  • wp-user-manager/trunk/includes/forms/class-wpum-form-registration.php

    r3529166 r3805852  
    224224                if ( $form === $this->form_name && isset( $values['register']['role'] ) ) {
    225225                        $role_field     = $values['register']['role'];
    226                         $selected_roles = array_flip( $registration_form->get_setting( 'register_roles' ) );
    227                         if ( ! array_key_exists( $role_field, $selected_roles ) ) {
     226                        $selected_roles = array_flip( (array) $registration_form->get_setting( 'register_roles' ) );
     227                        if ( 'administrator' === $role_field || ! array_key_exists( $role_field, $selected_roles ) ) {
    228228                                return new WP_Error( 'role-validation-error', __( 'Select a valid role from the list.', 'wp-user-manager' ) );
    229229                        }
    … …  
    573573                        // Assign the role set into the registration form.
    574574                        if ( $form->get_setting( 'allow_role_select' ) && isset( $values['register']['role'] ) ) {
    575                                 $user->set_role( $values['register']['role'] );
     575                                $role = $values['register']['role'];
    576576                        } else {
    577                                 $user->set_role( $this->role );
    578                         }
     577                                $role = $this->role;
     578                        }
     579
     580                        // Registration never grants administrator, however the form was set up.
     581                        if ( 'administrator' === $role ) {
     582                                $role = get_option( 'default_role' );
     583                                if ( 'administrator' === $role || ! get_role( $role ) ) {
     584                                        $role = 'subscriber';
     585                                }
     586                        }
     587
     588                        $user->set_role( $role );
    579589
    580590                        $upload_dir = wp_upload_dir()['basedir'];
  • wp-user-manager/trunk/includes/forms/wpum-registration-forms-functions.php

    r3757390 r3805852  
    248248                        }
    249249                }
     250
     251                if ( 'register_roles' === $key && is_array( $values[ $key ] ) ) {
     252                        // Visitors choose from these roles, so administrator is never one of them.
     253                        $values[ $key ] = array_values( array_diff( $values[ $key ], array( 'administrator' ) ) );
     254                }
    250255        }
    251256
    … …  
    311316                        }
    312317                }
     318        }
     319
     320        if ( 'register_roles' === $setting['id'] && in_array( 'administrator', (array) $value, true ) ) {
     321                // translators: %s role key
     322                return new WP_Error( 'wpum_registration_form_invalid_role', sprintf( esc_html__( 'The %s role cannot be assigned at registration.', 'wp-user-manager' ), 'administrator' ), array( 'status' => 400 ) );
    313323        }
    314324
  • wp-user-manager/trunk/includes/functions.php

    r3777624 r3805852  
    9797        $roles = array();
    9898
    99         $transient = get_transient( 'wpum_get_roles' );
     99        // One cache per list, so a list with the admin role never answers a call without it.
     100        $transient_key = $admin ? 'wpum_get_roles_admin' : 'wpum_get_roles';
     101        $transient     = get_transient( $transient_key );
    100102
    101103        if ( $transient && ! $force ) {
    102104                $roles = $transient;
     105
     106                if ( ! $admin ) {
     107                        // Caches written before the split can still hold the admin role.
     108                        $roles = array_values( wp_list_filter( $roles, array( 'value' => 'administrator' ), 'NOT' ) );
     109                }
    103110        } else {
    104111
    … …  
    118125                        );
    119126                }
    120                 set_transient( 'wpum_get_roles', $roles, DAY_IN_SECONDS );
     127                set_transient( $transient_key, $roles, DAY_IN_SECONDS );
    121128
    122129        }
  • wp-user-manager/trunk/includes/integrations/stripe/Account.php

    r3773561 r3805852  
    9999        public function enforce_payment() {
    100100                add_action( 'template_redirect', array( $this, 'unsubscribed_redirect' ) );
     101                add_filter( 'rest_pre_dispatch', array( $this, 'refuse_unpaid_rest_requests' ), 10, 3 );
    101102                add_filter( 'user_has_cap', array( $this, 'restrict_unpaid_capabilities' ), 10, 4 );
    102103                add_filter( 'wpum_user_access_roles', array( $this, 'withhold_unpaid_access_roles' ), 10, 2 );
    … …  
    147148                wp_safe_redirect( $redirect );
    148149                exit;
     150        }
     151
     152        /**
     153         * Refuse REST requests from users who still owe a payment. The front-end
     154         * redirect runs on template_redirect, which REST requests never reach, so
     155         * without this an unpaid account could read the site's content through
     156         * /wp/v2/posts and /wp/v2/pages.
     157         *
     158         * @param mixed            $result  Response to replace the requested version with.
     159         * @param \WP_REST_Server  $server  Server instance.
     160         * @param \WP_REST_Request $request Request used to generate the response.
     161         *
     162         * @return mixed
     163         */
     164        public function refuse_unpaid_rest_requests( $result, $server, $request ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed -- Matches the rest_pre_dispatch filter signature.
     165                if ( null !== $result || ! is_user_logged_in() ) {
     166                        return $result;
     167                }
     168
     169                if ( ! $this->owes_payment( get_current_user_id() ) ) {
     170                        return $result;
     171                }
     172
     173                $allowed_routes = apply_filters( 'wpum_stripe_not_paid_allowed_rest_routes', array( '/wpum/v1/stripe' ) );
     174                if ( in_array( untrailingslashit( $request->get_route() ), $allowed_routes, true ) ) {
     175                        return $result;
     176                }
     177
     178                return new \WP_Error( 'wpum_payment_required', esc_html__( 'Please complete your payment to access this site.', 'wp-user-manager' ), array( 'status' => 403 ) );
    149179        }
    150180
  • wp-user-manager/trunk/languages/wp-user-manager.pot

    r3777688 r3805852  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WP User Manager 2.10.5\n"
     5"Project-Id-Version: WP User Manager 2.10.6\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-user-manager\n"
    7 "POT-Creation-Date: 2026-11-01 08:30:18+00:00\n"
     7"POT-Creation-Date: 2026-11-16 18:30:58+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
    … …  
    175175msgstr ""
    176176
    177 #: includes/abstracts/class-wpum-form.php:372 includes/functions.php:689
     177#: includes/abstracts/class-wpum-form.php:372 includes/functions.php:696
    178178#. translators: %1s$ field label %2$s file extension %3$s allowed extensions
    179179#. translators: %1$s: file label %2$s: file type  %3$s: allowed types
    … …  
    293293#: includes/forms/class-wpum-registration-forms-editor.php:157
    294294#: includes/forms/class-wpum-registration-forms-editor.php:563
    295 #: includes/functions.php:814
     295#: includes/functions.php:821
    296296#: includes/integrations/elementor/widgets/class-wpum-elementor-widget.php:74
    297297#: vendor/wp-user-manager/wpum-blocks/includes/classes/Blocks/AccountPage.php:32
    … …  
    323323msgstr ""
    324324
    325 #: includes/actions.php:422 includes/functions.php:822
     325#: includes/actions.php:422 includes/functions.php:829
    326326#: templates/profile-card.php:44
    327327msgid "View Profile"
    … …  
    344344msgstr ""
    345345
    346 #: includes/actions.php:726
     346#: includes/actions.php:771
    347347msgid "You must be logged in to access this site."
    348348msgstr ""
    349349
    350 #: includes/actions.php:748 includes/forms/class-wpum-form-privacy.php:77
    351 #: includes/functions.php:837
     350#: includes/actions.php:862 includes/forms/class-wpum-form-privacy.php:77
     351#: includes/functions.php:844
    352352msgid "Profile Privacy"
    353353msgstr ""
    354354
    355 #: includes/actions.php:750
     355#: includes/actions.php:864
    356356msgid "Hide profile from guests"
    357357msgstr ""
    358358
    359 #: includes/actions.php:751
     359#: includes/actions.php:865
    360360msgid "Hide this profile from guests. Overrides the global profile options."
    361361msgstr ""
    362362
    363 #: includes/actions.php:752
     363#: includes/actions.php:866
    364364msgid "Hide profile from members"
    365365msgstr ""
    366366
    367 #: includes/actions.php:753
     367#: includes/actions.php:867
    368368msgid "Hide this profile from members. Overrides the global profile options."
    369369msgstr ""
    370370
    371 #: includes/actions.php:787
     371#: includes/actions.php:901
    372372#: includes/directories/class-wpum-directories-editor.php:311
    373373#: includes/fields/types/class-wpum-field-userrole.php:72
    … …  
    375375msgstr ""
    376376
    377 #: includes/actions.php:793
     377#: includes/actions.php:907
    378378msgid "Select one or more roles for this user."
    379379msgstr ""
    380380
    381 #: includes/actions.php:1366 includes/shortcodes/shortcodes.php:199
     381#: includes/actions.php:1495 includes/shortcodes/shortcodes.php:199
    382382msgid ""
    383383"Registration complete. We have sent you a confirmation email with your "
    … …  
    17731773#: includes/fields/types/class-wpum-field-email.php:35
    17741774#: includes/forms/class-wpum-form-password-recovery.php:108
    1775 #: includes/functions.php:291
     1775#: includes/functions.php:298
    17761776msgid "Email"
    17771777msgstr ""
    … …  
    18521852#: includes/fields/class-wpum-field.php:359
    18531853#: includes/forms/class-wpum-form-password-recovery.php:105
    1854 #: includes/functions.php:287
     1854#: includes/functions.php:294
    18551855msgid "Username"
    18561856msgstr ""
    … …  
    24152415#: includes/fields/types/class-wpum-field-password.php:35
    24162416#: includes/forms/class-wpum-form-login.php:104
    2417 #: includes/forms/class-wpum-form-password.php:99 includes/functions.php:818
     2417#: includes/forms/class-wpum-form-password.php:99 includes/functions.php:825
    24182418msgid "Password"
    24192419msgstr ""
    … …  
    25652565
    25662566#: includes/fields/wpum-fields-functions.php:903
    2567 #: includes/forms/wpum-registration-forms-functions.php:331
     2567#: includes/forms/wpum-registration-forms-functions.php:341
    25682568#. translators: %1$s value, %2$s setting key
    25692569#. translators: %1$s value, %2$s setting ID
    … …  
    26272627
    26282628#: includes/forms/class-wpum-form-password-recovery.php:103
    2629 #: includes/functions.php:83 includes/functions.php:293
     2629#: includes/functions.php:83 includes/functions.php:300
    26302630msgid "Username or Email Address"
    26312631msgstr ""
    … …  
    29632963msgstr ""
    29642964
    2965 #: includes/forms/wpum-registration-forms-functions.php:310
     2965#: includes/forms/wpum-registration-forms-functions.php:315
     2966#: includes/forms/wpum-registration-forms-functions.php:322
    29662967#. translators: %s role key
    29672968msgid "The %s role cannot be assigned at registration."
    … …  
    29802981msgstr ""
    29812982
    2982 #: includes/functions.php:180
     2983#: includes/functions.php:187
    29832984#. translators: %s list of core pages
    29842985msgid "Unknown page. Use one of: %s"
    29852986msgstr ""
    29862987
    2987 #: includes/functions.php:194
     2988#: includes/functions.php:201
    29882989msgid "The page must be a published or private page."
    29892990msgstr ""
    29902991
    2991 #: includes/functions.php:217
     2992#: includes/functions.php:224
    29922993msgid "The page could not be saved."
    29932994msgstr ""
    29942995
    2995 #: includes/functions.php:683
     2996#: includes/functions.php:690
    29962997msgid "Sorry, you are not allowed to upload this file type."
    29972998msgstr ""
    29982999
    2999 #: includes/functions.php:692
     3000#: includes/functions.php:699
    30003001#. translators: %s: allowed file types
    30013002msgid "Uploaded files need to be one of the following file types: %s"
    30023003msgstr ""
    30033004
    3004 #: includes/functions.php:826 includes/shortcodes/shortcodes.php:147
     3005#: includes/functions.php:833 includes/shortcodes/shortcodes.php:147
    30053006#: templates/profile-card.php:47 templates/user-overview.php:43
    30063007#: vendor/wp-user-manager/wpum-blocks/includes/classes/Blocks/LogoutLink.php:50
    … …  
    30083009msgstr ""
    30093010
    3010 #: includes/functions.php:1044
     3011#: includes/functions.php:1051
    30113012msgid "About"
    30123013msgstr ""
    30133014
    3014 #: includes/functions.php:1048
     3015#: includes/functions.php:1055
    30153016msgid "Posts"
    30163017msgstr ""
    30173018
    3018 #: includes/functions.php:1052
     3019#: includes/functions.php:1059
    30193020msgid "Comments"
    30203021msgstr ""
    … …  
    32363237msgstr ""
    32373238
    3238 #: includes/integrations/stripe/Account.php:257
    3239 #: includes/integrations/stripe/Account.php:272
     3239#: includes/integrations/stripe/Account.php:178
     3240msgid "Please complete your payment to access this site."
     3241msgstr ""
     3242
     3243#: includes/integrations/stripe/Account.php:287
     3244#: includes/integrations/stripe/Account.php:302
    32403245msgid "Billing"
    32413246msgstr ""
    32423247
    3243 #: includes/integrations/stripe/Account.php:286
     3248#: includes/integrations/stripe/Account.php:316
    32443249msgid ""
    32453250"Your subscription has been changed to a plan that isn't available for your "
    … …  
    32473252msgstr ""
    32483253
    3249 #: includes/integrations/stripe/Account.php:290
     3254#: includes/integrations/stripe/Account.php:320
    32503255msgid "An active subscription is required."
    32513256msgstr ""
    32523257
    3253 #: includes/integrations/stripe/Account.php:296
     3258#: includes/integrations/stripe/Account.php:326
    32543259msgid "Payment is required for access to the site."
    32553260msgstr ""
    32563261
    3257 #: includes/integrations/stripe/Account.php:303
     3262#: includes/integrations/stripe/Account.php:333
    32583263#. translators: %s the datetime the subscription will cancel.
    32593264msgid "Your plan will be canceled on <strong>%s</strong>."
    32603265msgstr ""
    32613266
    3262 #: includes/integrations/stripe/Account.php:423
    3263 #: includes/integrations/stripe/Account.php:456
     3267#: includes/integrations/stripe/Account.php:453
     3268#: includes/integrations/stripe/Account.php:486
    32643269msgid "Unknown Error"
    32653270msgstr ""
    32663271
    3267 #: includes/integrations/stripe/Account.php:429
     3272#: includes/integrations/stripe/Account.php:459
    32683273msgid "No subscription"
    32693274msgstr ""
    32703275
    3271 #: includes/integrations/stripe/Account.php:435
     3276#: includes/integrations/stripe/Account.php:465
    32723277msgid "Error creating Stripe session"
    32733278msgstr ""
    32743279
    3275 #: includes/integrations/stripe/Account.php:449
    3276 #: includes/integrations/stripe/Account.php:463
     3280#: includes/integrations/stripe/Account.php:479
     3281#: includes/integrations/stripe/Account.php:493
    32773282msgid "Unknown plan"
    32783283msgstr ""
    32793284
    3280 #: includes/integrations/stripe/Account.php:467
     3285#: includes/integrations/stripe/Account.php:497
    32813286#: includes/integrations/stripe/Registration.php:342
    32823287msgid "This plan is no longer available. Please contact the site owner."
    32833288msgstr ""
    32843289
    3285 #: includes/integrations/stripe/Account.php:477
     3290#: includes/integrations/stripe/Account.php:507
    32863291#: includes/integrations/stripe/Registration.php:411
    32873292msgid "There has been an issue when registering, please contact the site owner"
    32883293msgstr ""
    32893294
    3290 #: includes/integrations/stripe/Account.php:525
     3295#: includes/integrations/stripe/Account.php:555
    32913296msgid "Payment successfully completed."
    32923297msgstr ""
    … …  
    49804985msgstr ""
    49814986
    4982 #: includes/functions.php:887
     4987#: includes/functions.php:894
    49834988msgctxt "Permalink structure"
    49844989msgid "Display user ID"
    49854990msgstr ""
    49864991
    4987 #: includes/functions.php:892
     4992#: includes/functions.php:899
    49884993msgctxt "Permalink structure"
    49894994msgid "Display username"
    49904995msgstr ""
    49914996
    4992 #: includes/functions.php:897
     4997#: includes/functions.php:904
    49934998msgctxt "Permalink structure"
    49944999msgid "Display nickname"
    49955000msgstr ""
    49965001
    4997 #: includes/functions.php:893
     5002#: includes/functions.php:900
    49985003msgctxt "Example of permalink setting"
    49995004msgid "username"
    50005005msgstr ""
    50015006
    5002 #: includes/functions.php:898
     5007#: includes/functions.php:905
    50035008msgctxt "Example of permalink setting"
    50045009msgid "nickname"
  • wp-user-manager/trunk/readme.txt

    r3777688 r3805852  
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
    11 Stable Tag: 2.10.5
     11Stable Tag: 2.10.6
    1212
    1313Registration forms, a frontend login form, user profiles and a member directory for WordPress. Add Stripe payments and content restriction.
    … …  
    172172== Changelog ==
    173173
     174= 2.10.6 (16th November 2026) =
     175
     176- Security: Accounts that still owe a Stripe payment can't read the site's content through the REST API (thanks to HeeDong Cho for responsible disclosure)
     177- Security: Role-restricted blocks, widgets and menu items stay hidden until the Stripe payment is made (thanks to elba.code and Belladonnask for responsible disclosure)
     178- Security: Posting query variables to the login or registration page no longer gets past "Prevent site access to visitors" (thanks to Malvin Valerian Gultom for responsible disclosure)
     179- Security: The bundled Carbon Fields attachment route only returns attachments the user can see (thanks to Belladonnask for responsible disclosure)
     180- Security: Saving the multiple roles field only changes roles the editing user can assign
     181- Fix: Registration never assigns the Administrator role, and role lists that hide it no longer show it
     182
    174183= 2.10.5 (1st November 2026) =
    175184
  • wp-user-manager/trunk/vendor-dist/composer/installed.json

    r3468506 r3805852  
    15601560        {
    15611561            "name": "wp-user-manager\/wpum-blocks",
    1562             "version": "1.15",
    1563             "version_normalized": "1.15.0.0",
     1562            "version": "1.16",
     1563            "version_normalized": "1.16.0.0",
    15641564            "source": {
    15651565                "type": "git",
    15661566                "url": "https:\/\/github.com\/WPUserManager\/wpum-blocks.git",
    1567                 "reference": "fc3d01fe0baa2fb0fdf6a0f4cff30fc40bb1dbba"
    1568             },
    1569             "dist": {
    1570                 "type": "zip",
    1571                 "url": "https:\/\/api.github.com\/repos\/WPUserManager\/wpum-blocks\/zipball\/fc3d01fe0baa2fb0fdf6a0f4cff30fc40bb1dbba",
    1572                 "reference": "fc3d01fe0baa2fb0fdf6a0f4cff30fc40bb1dbba",
     1567                "reference": "78f6530be071a36de78892e862fa5a713318f849"
     1568            },
     1569            "dist": {
     1570                "type": "zip",
     1571                "url": "https:\/\/api.github.com\/repos\/WPUserManager\/wpum-blocks\/zipball\/78f6530be071a36de78892e862fa5a713318f849",
     1572                "reference": "78f6530be071a36de78892e862fa5a713318f849",
    15731573                "shasum": ""
    15741574            },
    … …  
    15771577                "php": ">=5.6"
    15781578            },
    1579             "time": "2023-11-18T15:05:09+00:00",
     1579            "time": "2026-11-03T11:41:39+00:00",
    15801580            "type": "library",
    15811581            "installation-source": "dist",
    … …  
    16051605            "support": {
    16061606                "issues": "https:\/\/github.com\/WPUserManager\/wpum-blocks\/issues",
    1607                 "source": "https:\/\/github.com\/WPUserManager\/wpum-blocks\/tree\/1.15"
     1607                "source": "https:\/\/github.com\/WPUserManager\/wpum-blocks\/tree\/1.16"
    16081608            },
    16091609            "install-path": "..\/wp-user-manager\/wpum-blocks"
  • wp-user-manager/trunk/vendor-dist/composer/installed.php

    r3777688 r3805852  
    33namespace WPUM;
    44
    5 return array('root' => array('name' => 'wp-user-manager/wp-user-manager', 'pretty_version' => 'v2.10.5', 'version' => '2.10.5.0', 'reference' => 'fbd84af7f889cb673af0851cabdd8c4739412281', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('brain/cortex' => array('pretty_version' => 'dev-refactoring-fastroute', 'version' => 'dev-refactoring-fastroute', 'reference' => '86bec053ec2c4d2e4c75af64e0cee951d9b0054b', 'type' => 'library', 'install_path' => __DIR__ . '/../brain/cortex', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'composer/installers' => array('pretty_version' => '1.x-dev', 'version' => '1.9999999.9999999.9999999-dev', 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/./installers', 'aliases' => array(), 'dev_requirement' => \false), 'dompdf/dompdf' => array('pretty_version' => 'v2.0.2', 'version' => '2.0.2.0', 'reference' => 'ad4c631bf8897fc1ca7b566468a969cfd71a558a', 'type' => 'library', 'install_path' => __DIR__ . '/../dompdf/dompdf', 'aliases' => array(), 'dev_requirement' => \false), 'gamajo/template-loader' => array('pretty_version' => '1.3.1', 'version' => '1.3.1.0', 'reference' => 'fa92a37b780d945463f7fea328dce14933558752', 'type' => 'library', 'install_path' => __DIR__ . '/../gamajo/template-loader', 'aliases' => array(), 'dev_requirement' => \false), 'htmlburger/carbon-fields' => array('pretty_version' => 'v3.6.9', 'version' => '3.6.9.0', 'reference' => 'f82e80e3e3469d6e86cc17a8950b918ad448a059', 'type' => 'library', 'install_path' => __DIR__ . '/../htmlburger/carbon-fields', 'aliases' => array(), 'dev_requirement' => \false), 'masterminds/html5' => array('pretty_version' => '2.7.6', 'version' => '2.7.6.0', 'reference' => '897eb517a343a2281f11bc5556d6548db7d93947', 'type' => 'library', 'install_path' => __DIR__ . '/../masterminds/html5', 'aliases' => array(), 'dev_requirement' => \false), 'nesbot/carbon' => array('pretty_version' => '2.66.0', 'version' => '2.66.0.0', 'reference' => '496712849902241f04902033b0441b269effe001', 'type' => 'library', 'install_path' => __DIR__ . '/../nesbot/carbon', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/fast-route' => array('pretty_version' => 'v0.7.0', 'version' => '0.7.0.0', 'reference' => '8164b4a0d8afde4eae5f1bfc39084972ba23ad36', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/fast-route', 'aliases' => array(), 'dev_requirement' => \false), 'phenx/php-font-lib' => array('pretty_version' => '0.5.4', 'version' => '0.5.4.0', 'reference' => 'dd448ad1ce34c63d09baccd05415e361300c35b4', 'type' => 'library', 'install_path' => __DIR__ . '/../phenx/php-font-lib', 'aliases' => array(), 'dev_requirement' => \false), 'phenx/php-svg-lib' => array('pretty_version' => '0.5.0', 'version' => '0.5.0.0', 'reference' => '76876c6cf3080bcb6f249d7d59705108166a6685', 'type' => 'library', 'install_path' => __DIR__ . '/../phenx/php-svg-lib', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-message' => array('pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'dev_requirement' => \false), 'roundcube/plugin-installer' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'sabberworm/php-css-parser' => array('pretty_version' => '8.4.0', 'version' => '8.4.0.0', 'reference' => 'e41d2140031d533348b2192a83f02d8dd8a71d30', 'type' => 'library', 'install_path' => __DIR__ . '/../sabberworm/php-css-parser', 'aliases' => array(), 'dev_requirement' => \false), 'shama/baton' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'stripe/stripe-php' => array('pretty_version' => 'v10.5.0', 'version' => '10.5.0.0', 'reference' => '331415b232d60d7c0449de7bde4cb7d4fedf982e', 'type' => 'library', 'install_path' => __DIR__ . '/../stripe/stripe-php', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => 'cfa0ae98841b9e461207c13ab093d76b0fa7bace', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation' => array('pretty_version' => 'v5.4.11', 'version' => '5.4.11.0', 'reference' => '7a1a8f6bbff269f434a83343a0a5d36a4f8cfa21', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'reference' => '136b19dd05cdf0709db6537d058bcab6dd6e2dbe', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '2.3')), 'wearerequired/wp-requirements-check' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => '82b8a6c4b953f59e7e534df2d4287e34af950812', 'type' => 'library', 'install_path' => __DIR__ . '/../wearerequired/wp-requirements-check', 'aliases' => array(), 'dev_requirement' => \false), 'wp-user-manager/wp-notices' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => '5498f209c6667e88e944194a93a50f9ffc25ea24', 'type' => 'library', 'install_path' => __DIR__ . '/../wp-user-manager/wp-notices', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'wp-user-manager/wp-optionskit' => array('pretty_version' => '1.1.2', 'version' => '1.1.2.0', 'reference' => '6253bda447991733bf8e19cb2123b41c666f3d62', 'type' => 'library', 'install_path' => __DIR__ . '/../wp-user-manager/wp-optionskit', 'aliases' => array(), 'dev_requirement' => \false), 'wp-user-manager/wp-user-manager' => array('pretty_version' => 'v2.10.5', 'version' => '2.10.5.0', 'reference' => 'fbd84af7f889cb673af0851cabdd8c4739412281', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'wp-user-manager/wpum-blocks' => array('pretty_version' => '1.15', 'version' => '1.15.0.0', 'reference' => 'fc3d01fe0baa2fb0fdf6a0f4cff30fc40bb1dbba', 'type' => 'library', 'install_path' => __DIR__ . '/../wp-user-manager/wpum-blocks', 'aliases' => array(), 'dev_requirement' => \false), 'wpbp/widgets-helper' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => '5547acaaf60b856b0025cdf44e3831e0f3202929', 'type' => 'library', 'install_path' => __DIR__ . '/../wpbp/widgets-helper', 'aliases' => array(), 'dev_requirement' => \false)));
     5return array('root' => array('name' => 'wp-user-manager/wp-user-manager', 'pretty_version' => 'v2.10.6', 'version' => '2.10.6.0', 'reference' => '37ef32c6308bfa1a5860e99302189e82dc1ab8b3', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('brain/cortex' => array('pretty_version' => 'dev-refactoring-fastroute', 'version' => 'dev-refactoring-fastroute', 'reference' => '86bec053ec2c4d2e4c75af64e0cee951d9b0054b', 'type' => 'library', 'install_path' => __DIR__ . '/../brain/cortex', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'composer/installers' => array('pretty_version' => '1.x-dev', 'version' => '1.9999999.9999999.9999999-dev', 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/./installers', 'aliases' => array(), 'dev_requirement' => \false), 'dompdf/dompdf' => array('pretty_version' => 'v2.0.2', 'version' => '2.0.2.0', 'reference' => 'ad4c631bf8897fc1ca7b566468a969cfd71a558a', 'type' => 'library', 'install_path' => __DIR__ . '/../dompdf/dompdf', 'aliases' => array(), 'dev_requirement' => \false), 'gamajo/template-loader' => array('pretty_version' => '1.3.1', 'version' => '1.3.1.0', 'reference' => 'fa92a37b780d945463f7fea328dce14933558752', 'type' => 'library', 'install_path' => __DIR__ . '/../gamajo/template-loader', 'aliases' => array(), 'dev_requirement' => \false), 'htmlburger/carbon-fields' => array('pretty_version' => 'v3.6.9', 'version' => '3.6.9.0', 'reference' => 'f82e80e3e3469d6e86cc17a8950b918ad448a059', 'type' => 'library', 'install_path' => __DIR__ . '/../htmlburger/carbon-fields', 'aliases' => array(), 'dev_requirement' => \false), 'masterminds/html5' => array('pretty_version' => '2.7.6', 'version' => '2.7.6.0', 'reference' => '897eb517a343a2281f11bc5556d6548db7d93947', 'type' => 'library', 'install_path' => __DIR__ . '/../masterminds/html5', 'aliases' => array(), 'dev_requirement' => \false), 'nesbot/carbon' => array('pretty_version' => '2.66.0', 'version' => '2.66.0.0', 'reference' => '496712849902241f04902033b0441b269effe001', 'type' => 'library', 'install_path' => __DIR__ . '/../nesbot/carbon', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/fast-route' => array('pretty_version' => 'v0.7.0', 'version' => '0.7.0.0', 'reference' => '8164b4a0d8afde4eae5f1bfc39084972ba23ad36', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/fast-route', 'aliases' => array(), 'dev_requirement' => \false), 'phenx/php-font-lib' => array('pretty_version' => '0.5.4', 'version' => '0.5.4.0', 'reference' => 'dd448ad1ce34c63d09baccd05415e361300c35b4', 'type' => 'library', 'install_path' => __DIR__ . '/../phenx/php-font-lib', 'aliases' => array(), 'dev_requirement' => \false), 'phenx/php-svg-lib' => array('pretty_version' => '0.5.0', 'version' => '0.5.0.0', 'reference' => '76876c6cf3080bcb6f249d7d59705108166a6685', 'type' => 'library', 'install_path' => __DIR__ . '/../phenx/php-svg-lib', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-message' => array('pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'dev_requirement' => \false), 'roundcube/plugin-installer' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'sabberworm/php-css-parser' => array('pretty_version' => '8.4.0', 'version' => '8.4.0.0', 'reference' => 'e41d2140031d533348b2192a83f02d8dd8a71d30', 'type' => 'library', 'install_path' => __DIR__ . '/../sabberworm/php-css-parser', 'aliases' => array(), 'dev_requirement' => \false), 'shama/baton' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'stripe/stripe-php' => array('pretty_version' => 'v10.5.0', 'version' => '10.5.0.0', 'reference' => '331415b232d60d7c0449de7bde4cb7d4fedf982e', 'type' => 'library', 'install_path' => __DIR__ . '/../stripe/stripe-php', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => 'cfa0ae98841b9e461207c13ab093d76b0fa7bace', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation' => array('pretty_version' => 'v5.4.11', 'version' => '5.4.11.0', 'reference' => '7a1a8f6bbff269f434a83343a0a5d36a4f8cfa21', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('pretty_version' => 'v2.5.2', 'version' => '2.5.2.0', 'reference' => '136b19dd05cdf0709db6537d058bcab6dd6e2dbe', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '2.3')), 'wearerequired/wp-requirements-check' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => '82b8a6c4b953f59e7e534df2d4287e34af950812', 'type' => 'library', 'install_path' => __DIR__ . '/../wearerequired/wp-requirements-check', 'aliases' => array(), 'dev_requirement' => \false), 'wp-user-manager/wp-notices' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => '5498f209c6667e88e944194a93a50f9ffc25ea24', 'type' => 'library', 'install_path' => __DIR__ . '/../wp-user-manager/wp-notices', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'wp-user-manager/wp-optionskit' => array('pretty_version' => '1.1.2', 'version' => '1.1.2.0', 'reference' => '6253bda447991733bf8e19cb2123b41c666f3d62', 'type' => 'library', 'install_path' => __DIR__ . '/../wp-user-manager/wp-optionskit', 'aliases' => array(), 'dev_requirement' => \false), 'wp-user-manager/wp-user-manager' => array('pretty_version' => 'v2.10.6', 'version' => '2.10.6.0', 'reference' => '37ef32c6308bfa1a5860e99302189e82dc1ab8b3', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'wp-user-manager/wpum-blocks' => array('pretty_version' => '1.16', 'version' => '1.16.0.0', 'reference' => '78f6530be071a36de78892e862fa5a713318f849', 'type' => 'library', 'install_path' => __DIR__ . '/../wp-user-manager/wpum-blocks', 'aliases' => array(), 'dev_requirement' => \false), 'wpbp/widgets-helper' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => '5547acaaf60b856b0025cdf44e3831e0f3202929', 'type' => 'library', 'install_path' => __DIR__ . '/../wpbp/widgets-helper', 'aliases' => array(), 'dev_requirement' => \false)));
  • wp-user-manager/trunk/vendor-dist/wp-user-manager/wpum-blocks/blocks-loader.php

    r2998234 r3805852  
    128128            $allowed_roles = \array_map('trim', $allowed_roles);
    129129            $current_user = wp_get_current_user();
    130             if (is_user_logged_in() && \array_intersect($current_user->roles, $allowed_roles)) {
     130            if (is_user_logged_in() && \array_intersect(wpum_get_user_access_roles($current_user), $allowed_roles)) {
    131131                return $block_content;
    132132            }
    … …  
    215215            $allowed_roles = \array_map('trim', $allowed_roles);
    216216            $current_user = wp_get_current_user();
    217             if (is_user_logged_in() && \array_intersect($current_user->roles, $allowed_roles)) {
     217            if (is_user_logged_in() && \array_intersect(wpum_get_user_access_roles($current_user), $allowed_roles)) {
    218218                return $instance;
    219219            }
  • wp-user-manager/trunk/wp-user-manager.php

    r3777688 r3805852  
    44 * Plugin URI:  https://wpusermanager.com
    55 * Description: Beautifully simple user profile directories with frontend login, registration and account customization. WP User Manager is the best solution to manage your community and your users for WordPress.
    6  * Version:     2.10.5
     6 * Version:     2.10.6
    77 * Requires PHP: 7.4
    88 * Author:      WP User Manager
    … …  
    2222        require_once __DIR__ . '/includes/class-wp-user-manager.php';
    2323
    24         return WP_User_Manager::instance( __FILE__, '2.10.5' );
     24        return WP_User_Manager::instance( __FILE__, '2.10.6' );
    2525}
    2626
Note: See TracChangeset for help on using the changeset viewer.