Plugin Directory

Changeset 1928786


Ignore:
Timestamp:
08/22/2018 07:18:17 PM (8 years ago)
Author:
thexerox
Message:

0.2.4

  • Fix: User specific access does not work
Location:
super-access-manager/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • super-access-manager/trunk/inc/admin/class-accessmanager.php

    r1916342 r1928786  
    342342            $usercheck = false;
    343343
     344
     345            if(isset($current_user->ID )) {
     346                // Check if user on its own had access
     347                if ( in_array( $current_user->ID, $meta_array ) ) {
     348                    return true;
     349                }
     350            }
     351
    344352            // check if only available vistors
    345353            if(in_array('onlyvistors',$meta_array)){
     
    347355                // Vistors can see or Admins  - Not available for other users
    348356                if(!isset($current_user->ID) OR get_option('xeweb-sam_admin_see_all_pages') == "on" && current_user_can('manage_options')){
    349                     return true;
     357                    return true;
    350358                }
    351 
    352                 // Not available for other users
    353                 return null;
    354359
    355360            }
     
    363368                }
    364369
    365                 // Not available for other users
    366                 return null;
    367 
    368             }
    369 
     370            }
    370371
    371372
     
    388389            }
    389390
    390             if ($usercheck == true) { // check if user has posts
     391            if ($usercheck === true) { // check if user has posts
    391392
    392393                if($meta_array != 0) { // check if post id is not zero
     
    394395                }
    395396
    396             }elseif($rolecheck == true && $usercheck != true){ // check roles
     397            }elseif($rolecheck === true){ // check roles
    397398
    398399                return true;
     
    671672
    672673            // If not, remove from list
    673             if ( $usercan != true ) unset( $items[$key] );
     674            if ( $usercan !== true ) unset( $items[$key] );
    674675
    675676        }
  • super-access-manager/trunk/readme.txt

    r1916353 r1928786  
    5454== Changelog ==
    5555
     56= 0.2.4 =
     57* Fix: User specific access does not work
     58
    5659= 0.2.3.2 =
    5760* Fix: Headers already send on activation fixed
  • super-access-manager/trunk/super-access-manager.php

    r1916351 r1928786  
    33* Plugin Name: Super Access Manager
    44* Description: Control post access on a role and userbased level.
    5 * Version:     0.2.3.2
     5* Version:     0.2.4
    66* Author:      Xeweb
    77* Author URI:  https://www.xeweb.be
Note: See TracChangeset for help on using the changeset viewer.