PHP code example of andri-sudarmawijaya / smartyacl

1. Go to this page and download the library: Download andri-sudarmawijaya/smartyacl 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/ */

    

andri-sudarmawijaya / smartyacl example snippets


$this->smarty_acl->register($identity, $password, $email, $additional_data, $role_id);

$this->smarty_acl->register_user($identity, $password, $email, $additional_data, $role_id);

$this->smarty_acl->login($identity, $password, $remember, $admin);

//Admin user
$this->smarty_acl->activate($user_id, $code);
//User
$this->smarty_acl->activate_user($user_id, $code);

$this->smarty_acl->resend_activation($email, $admin);

$this->smarty_acl->forgotten_password($email, $admin);

$this->smarty_acl->forgotten_password_check($code, $admin);

$this->smarty_acl->reset_password($user, $email, $password, $admin);

$this->smarty_acl->logged_in($admin);

$this->smarty_acl->logout($admin);

$this->smarty_acl->roles($result);

$this->smarty_acl->create_role($data);

$this->smarty_acl->role($role_id);

$this->smarty_acl->update_role($role_id, $data);

$this->smarty_acl->delete_role($role_id);

$this->smarty_acl->modules($result);

$this->smarty_acl->create_module($data);

$this->smarty_acl->module($module_id);

$this->smarty_acl->update_module($module_id, $data);

$this->smarty_acl->delete_module($module_id);

$this->smarty_acl->module_permissions($role_id);

$this->smarty_acl->authorized();

$this->smarty_acl->module_authorized($module);

$this->smarty_acl->authorized_action();

$this->smarty_acl->has_permission($permission);

$this->smarty_acl->admins($result);

$this->smarty_acl->users($result);

$this->smarty_acl->get_user($user_id);

$this->smarty_acl->get_admin($user_id);

$this->smarty_acl->update_user($data, $user_id, $admin);

$this->smarty_acl->delete_user($user_id,$admin);

$this->smarty_acl->set_delimiter($start, $end);

$this->smarty_acl->errors();

    $autoload['packages'] = array(APPPATH.'third_party/SmartyAcl');
    

int = user registered
array = user data array if verification is enabled but 'email_sender' is disabled
false(bool) = failed to register

int = user registered
array = user data array if verification is enabled but 'email_sender' is disabled
false(bool) = failed to register

(bool) = false if code is invalid or expired
(array) = user data array

(array) = multidimensional array with
{
    [module_id] => {
        [permission_id] => [permission_method_name]
    }
}

User data as array

Admin data as array