Tutorial - Add full meridian function to myWeb | hrace009 Community ✅

Tutorial Add full meridian function to myWeb

hrace009

Administrator
Staff member
This is just a idea the way add it as an addon to MyWeb Panel.

PHP:
$api = My::app()->getApi();
$role = CAuth::selectedRoleId();
$roleData = $api->getRole($role);

if ($roleData['status']['meridian_data'] != '0000005000000000000000000000000500000064000000000000000100000000000000000000000000000000000000000000000000000000'){
  
    $roleData['status']['meridian_data'] = '0000005000000000000000000000000500000064000000000000000100000000000000000000000000000000000000000000000000000000';

    if($api->putRole($role, $roleData)) {
        echo 'success';
    }else {
        echo 'system error';
    }
}
 
Top