Plugin Directory

Changeset 3221099


Ignore:
Timestamp:
01/12/2025 03:01:34 PM (13 months ago)
Author:
sourov
Message:

3.1.2dev

Location:
user-meta/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • user-meta/trunk/controllers/ShortcodesController.php

    r2855167 r3221099  
    9797
    9898        $publicProfile = new PublicProfile($form, $call, $style);
    99         return $publicProfile->generate();
     99
     100        if (!$userMeta->isPro()) {
     101            // show public profile only to user with 'edit_user' capability
     102            if (current_user_can('edit_users')) {
     103                return $publicProfile->generate();
     104            }
     105            else {
     106                return $userMeta->showError(esc_html__('You do not have permission to view this user profile!', $userMeta->name));
     107            }
     108        }
     109        else {
     110            return $publicProfile->generate();
     111        }       
    100112    }
    101113 
  • user-meta/trunk/models/MethodsModel.php

    r2218746 r3221099  
    8181            // elseif ( ! get_option( 'users_can_register' ) )
    8282        } elseif ($actionType == 'public') {
     83            if (!current_user_can('edit_users') && !$userMeta->isPro()) {
     84                return $userMeta->showError(esc_html__('You do not have permission to view this user profile!', $userMeta->name));
     85            }
    8386            if (! empty($_REQUEST['user_id'])) {
    8487                $userID = esc_attr($_REQUEST['user_id']);
  • user-meta/trunk/models/SupportHtmlModel.php

    r2855167 r3221099  
    6262        $html .= '<p><div><strong>' . __('Registration shortcode', $userMeta->name) . '</strong></div>[user-meta-registration form="Form_Name"]</p>';
    6363        $html .= '<p><div><strong>' . __('Profile / Registration', $userMeta->name) . '</strong></div><div>[user-meta type=profile-registration form="Form_Name"]</div><div><em>(To show user profile if user logged in, or showing registration form, if user not logged in.)</em></div></p>';
    64         $html .= '<p><div><strong>' . __('Public profile', $userMeta->name) . '</strong></div><div>[user-meta type=public form="Form_Name"] or [user-meta-public-profile form="Form_Name"]</div><div><em>(To show public profile if user_id parameter provided as GET request. For the later one, optional parameters: call="id/email/username", style="table/plain/line")</em></div></p>';
     64        if ($userMeta->isPro()) {
     65            $html .= '<p><div><strong>' . __('Public profile', $userMeta->name) . '</strong></div><div>[user-meta type=public form="Form_Name"] or [user-meta-public-profile form="Form_Name"]</div><div><em>(To show public profile if user_id parameter provided as GET request. For the later one, optional parameters: call="id/email/username", style="table/plain/line")</em></div></p>';
     66        }
    6567        $html .= '<p><div><strong>' . __('Login shortcode', $userMeta->name) . '</strong></div>[user-meta-login] OR [user-meta-login form="Form_Name"]</p>';
    6668        if ($userMeta->isPro()) {
  • user-meta/trunk/readme.txt

    r3217952 r3221099  
    55Requires PHP: 5.6.0
    66Tested up to: 6.7.1
    7 Stable tag: 3.1
     7Stable tag: 3.1.2
    88Copyright: User Meta, https://user-meta.com
    99License: GPLv2
     
    163163
    164164== Changelog ==
     165
     166= 3.1.2 =
     167* Fix: Security fix
     168* Public profile shortcode functionality reduced and output restricted
    165169
    166170= 3.0 =
  • user-meta/trunk/user-meta.php

    r3217952 r3221099  
    44 * Plugin URI: https://user-meta.com
    55 * Description: A well-designed, feature-rich, and easy to use user management plugin.
    6  * Version: 3.1.1dev
     6 * Version: 3.1.2dev
    77 * Requires at least: 4.7
    88 * Requires PHP: 5.6.0
Note: See TracChangeset for help on using the changeset viewer.