Download the PHP package andri-sudarmawijaya/smartyacl without Composer

On this page you can find all versions of the php package andri-sudarmawijaya/smartyacl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package smartyacl

Smarty ACL

SmartyACL is a library with basic authentication and authorization functions for Codeigniter 3. This library was based on Ion Auth but with the addition of ACL / RBAC and some other features.

Features

Summary

Requirements

Demo

Download a demo application here

Installation

  1. Download latest released version
  2. Put SmartyAcl folder on application/third_party directory or install using composer

  3. Add to $autoload['packages']¹ in application/config/autoload.php

  4. Import DB tables using migration or database.sql file
  5. Config library preferences on application/third_party/SmartyAcl/config/smarty_acl.php

¹ Alternatively, you can copy the contents of the SmartyAcl folder to the respective directories in the application folder and load the library directly into the controller using $this->load->library('smarty_acl');

Default Login

Username: admin
Password: 123456

Usage

Methods List

Method Description
register() Register a new Admin User
register_user() Register a new User
login() User or Admin Login
activate() Activate admin user with code(email)
activate_user() Activate user with code(email)
resend_activation() Resend email confirmation code (admin/user)
forgotten_password() Send reset password email (admin/user)
forgotten_password_check() Validate forgotten password code (admin/user)
reset_password() Reset email and password (admin/user)
logged_in() Check if user is logged in (admin/user)
logout() Logout current logged in user (admin/user)
roles() Get roles list
role() Get single role
create_role() Create a new Role
update_role() Update a single Role
delete_role() Delete a single Role
modules() Get modules list
module() Get single module
create_module() Create a new Module
update_module() Update a single Module
delete_module() Delete a single Module
module_permissions() Get a single Module Permissions
authorized() Check if logged in user is authorized to access current module
module_authorized() Check if logged in user has permission to a specific module
authorized_action() Check if logged in user has permission to current module action method
has_permission() Check if logged in user has permission to a specific module action method
admins() Get admins
users() Get users
get_user() Get a single user
get_admin() Get a single admin
update_user() Update a single user (admin/user)
delete_user() Delete a single user (admin/user)
set_delimiter() Set delimiters for error messages
errors() Show error messages

Register Admin

Call:

Responses:

Field Required Info
$identity yes field used to register/login user (username, email, phone, etc)
$password yes user password
$email yes user email address
$additional_data no array with additional data(name, address, country, etc) (optional)
$role_id no role id to assign(optional). If null, will use $config['default_role']

Register User

Call:

Responses:

Field Required Info
$identity yes field used to register/login user (username, email, phone, etc)
$password yes user password
$email yes user email address
$additional_data no array with additional data(name, address, country, etc) (optional)

Login

Call:

Response:

Field Required Info
$identity yes field used to register/login user (username, email, phone, etc)
$password yes user password
$admin no (default TRUE) (bool) set FALSE to user login

Activate Admin or user

Call:

Response:

Field Required Info
$user_id yes User ID
$code yes Activation Security Code

Resend Activation Mail

Call:

Response:

Field Required Info
$email yes User email address
$admin no (default TRUE) (bool) set FALSE to use for users

Forgotten Password

Call:

Response:

Field Required Info
$email yes User email address
$admin no (default TRUE) (bool) set FALSE to use for users

Forgotten Password Check

Call:

Response:

Field Required Info
$code yes Secret Code
$admin no (default TRUE) (bool) set FALSE to use for users

Reset Password

Call:

Response:

Field Required Info
$user yes Array with current user data(from forgotten_password_check())
$email yes New email address
$password yes New password
$admin no (default TRUE) (bool) set FALSE to use for users

Logged in

Call:

Response:

Field Required Info
$admin no (default TRUE) (bool) set FALSE to use for users

Logout

Call:

Response:

Field Required Info
$admin no (default TRUE) (bool) set FALSE to use for users

Get Roles

Call:

Response:

Field Required Info
$result no (default TRUE) (bool) set FALSE to return array

Create Role

Call:

Response:

Field Required Info
$data yes array with role fields/values

Get Role

Call:

Response:

Field Required Info
$role_id yes Role ID

Update Role

Call:

Response:

Field Required Info
$role_id yes Role ID
$data yes array with role fields/values

Delete Role

Call:

Response:

Field Required Info
$role_id yes Role ID

Get Modules

Call:

Response:

Field Required Info
$result no (default TRUE) (bool) set FALSE to return array

Create Module

Call:

Response:

Field Required Info
$data yes array with module fields/values

Get Module

Call:

Response:

Field Required Info
$role_id yes Role ID

Update Module

Call:

Response:

Field Required Info
$role_id yes Role ID
$data yes array with module fields/values

Delete Module

Call:

Response:

Field Required Info
$role_id yes Role ID

Get Module Permissions

Call:

Response:

Field Required Info
$role_id yes Role ID

Authorized

Call:

Response:

Module Authorized

Call:

Response:

Field Required Info
$module yes Module Controller Name

Authorized Module Action

Call:

Response:

Has Permission

Call:

Response:

Field Required Info
$permission yes Module Permission Name

Get Admins

Call:

Response:

Field Required Info
$result no (default TRUE) (bool) set FALSE to return array

Get Users

Call:

Response:

Field Required Info
$result no (default TRUE) (bool) set FALSE to return array

Get User

Call:

Response:

Field Required Info
$user_id yes User ID

Get Admin

Call:

Response:

Field Required Info
$user_id yes User ID

Update User

Call:

Response:

Field Required Info
$data yes array with user fields/values
$user_id yes User ID
$admin no (default TRUE) (bool) set FALSE to use for users

Delete User

Call:

Response:

Field Required Info
$user_id yes User ID
$admin no (default TRUE) (bool) set FALSE to use for users

Errors Delimiters

Call:

Response:

Field Required Info
$start yes Start delimiter (<p>,<li>,<span>, etc)
$end yes End delimiter (</p>,</li>,</span>, etc)

Error Messages

Call:

Response:

Contributing

Feel free to contribute with corrections, optimizations or improvements. Just send a Pull Request with your contribution.

Support

If you found a bug, Create an Issue. If you're having an issue with CodeIgniter or for general help with development I recommend checking out the CodeIgniter Forums

References


All versions of smartyacl with dependencies

PHP Build Version
Package Version
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package andri-sudarmawijaya/smartyacl contains the following files

Loading the files please wait ....