Plugin Directory

Changeset 921483


Ignore:
Timestamp:
05/27/2014 07:13:29 AM (12 years ago)
Author:
speedito
Message:

improved error handling when user not logged in

Location:
restrict-partial-content
Files:
3 edited
2 copied

Legend:

Unmodified
Added
Removed
  • restrict-partial-content/tags/0.2/readme.txt

    r916101 r921483  
    44Requires at least: 3.9.1
    55Tested up to: 3.9.1
    6 Stable tag: 0.1
     6Stable tag: 0.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    99
    10 This is a simple plugin to allow you to restrict the access to specific portion of the page/post.
     10This is a simple plugin to allow you to restrict the access to specific portion of the page/post. You can use the shortcode provided to show some of the content and restrict the remaining content to specific users or user types(via roles).
    1111
    1212== Description ==
    13 This is a simple plugin to allow you to restrict the access to specific portion of the page/post. You can use the shortcode provided to show some of the content and restrict the remaining content to specific users or user types(via roles).
    14 
    1513Typical use case would be to restrict access to a bit of content to users unless they are logged. Can help you improve your subscription rates.
    1614
     
    2119</ol>
    2220
    23 Details and examples about using the plugin are available at <a href="http://speedsoftsol.com/restrict-partial-content" target="_blank">speedsoftsol.com/restrict-partial-content</a>
     21Details and examples about using the plugin are available at <a href="http://speedsoftsol.com/restrict-partial-content" target="_blank">speedsoftsol.com/simple-faq-plugin/</a>
    2422
    2523== Installation ==
     
    4240= 0.1 =
    4341Initial launch
     42
     43= 0.2 =
     44Improve check when user is not logged in
  • restrict-partial-content/tags/0.2/restrict-partial-content.php

    r915456 r921483  
    2929    $user_list = explode (",", $allow_user);
    3030    $user_list_trimmed = array_map('trim', $user_list);
    31     if (in_array($user_id, $user_list_trimmed)) {
     31    if ($user_id != NULL && in_array($user_id, $user_list_trimmed)) {
    3232        $restrict = 0;
    3333    }
     
    3636    $role_list = explode (",", $allow_role);
    3737    $role_list_trimmed = array_map('trim', $role_list);
    38     if (in_array ($user_role, $role_list_trimmed)) {
     38    if ($user_id != NULL && in_array ($user_role, $role_list_trimmed)) {
    3939        $restrict = 0;
    4040    }
  • restrict-partial-content/trunk/readme.txt

    r916101 r921483  
    44Requires at least: 3.9.1
    55Tested up to: 3.9.1
    6 Stable tag: 0.1
     6Stable tag: 0.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    99
    10 This is a simple plugin to allow you to restrict the access to specific portion of the page/post.
     10This is a simple plugin to allow you to restrict the access to specific portion of the page/post. You can use the shortcode provided to show some of the content and restrict the remaining content to specific users or user types(via roles).
    1111
    1212== Description ==
    13 This is a simple plugin to allow you to restrict the access to specific portion of the page/post. You can use the shortcode provided to show some of the content and restrict the remaining content to specific users or user types(via roles).
    14 
    1513Typical use case would be to restrict access to a bit of content to users unless they are logged. Can help you improve your subscription rates.
    1614
     
    2119</ol>
    2220
    23 Details and examples about using the plugin are available at <a href="http://speedsoftsol.com/restrict-partial-content" target="_blank">speedsoftsol.com/restrict-partial-content</a>
     21Details and examples about using the plugin are available at <a href="http://speedsoftsol.com/restrict-partial-content" target="_blank">speedsoftsol.com/simple-faq-plugin/</a>
    2422
    2523== Installation ==
     
    4240= 0.1 =
    4341Initial launch
     42
     43= 0.2 =
     44Improve check when user is not logged in
  • restrict-partial-content/trunk/restrict-partial-content.php

    r915456 r921483  
    2929    $user_list = explode (",", $allow_user);
    3030    $user_list_trimmed = array_map('trim', $user_list);
    31     if (in_array($user_id, $user_list_trimmed)) {
     31    if ($user_id != NULL && in_array($user_id, $user_list_trimmed)) {
    3232        $restrict = 0;
    3333    }
     
    3636    $role_list = explode (",", $allow_role);
    3737    $role_list_trimmed = array_map('trim', $role_list);
    38     if (in_array ($user_role, $role_list_trimmed)) {
     38    if ($user_id != NULL && in_array ($user_role, $role_list_trimmed)) {
    3939        $restrict = 0;
    4040    }
Note: See TracChangeset for help on using the changeset viewer.