PHP code example of xiidea / ezrbac

1. Go to this page and download the library: Download xiidea/ezrbac library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

xiidea / ezrbac example snippets


$hook['post_controller_constructor'] = array(
    'class' => 'EzRbacHook',
    'function' => 'accessCheck',
    'filename' => 'EzRbacHook.php',
    'filepath' => 'third_party/ezRbac'
);

 public function access_map(){
        return array(
            'index'=>'view',
            'update'=>'edit'
        );
    }
 
array(
    'id'                  => 'id',
    'email'               => 'email',
    'password'            => 'password',
    'salt'                => 'salt',
    'user_role_id'        => 'user_role_id',
    'last_login'          => 'last_login',
    'last_login_ip'       => 'last_login_ip',
    'reset_request_code'  => 'reset_request_code',
    'reset_request_time'  => 'reset_request_time',
    'reset_request_ip'    => 'reset_request_ip',
    'verification_status' => 'verification_status',
    'status'              => 'status'
);  

array(
    'id'        => 'id',
    'role_name' => 'role_name'
);