Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Aauth is a User Authorization Library for CodeIgniter 2.x and 3.x, which aims to make easy some essential jobs such as login, permissions and access operations. Despite its ease of use, it has also very advanced features like private messages, groupping, access management, and public access.

This is Quick Start page. You can also take a look at the detailed Documentation Wiki to learn about other great Features


  • User Management and Operations (login, logout, register, verification via e-mail, forgotten password, user ban, login DDoS protection)
  • Group Operations (creating/deleting groups, membership management)
  • Admin and Public Group support (Public permissions)
  • Permission Management (creating/deleting permissions, allow/deny groups, public permissions, permission checking)
  • Group Permissions
  • User Permissions
  • User and System Variables
  • Login DDoS Protection
  • Private Messages (between users)
  • Error Messages and Validations
  • Langugage and config file support
  • Flexible implementation

What is new in Version 2

  • User Permissions
  • User and System Variables
  • Login DDoS Protection
  • Updated functions (check documentation for details)
  • Bugs fixes
  • TOTP (Time-based One-time Password)


Quick Start

Let's get started :) First, we will load the Aauth Library into the system


That was easy!

Now let's create two new users, Frodo and Legolas.


We now we have two users.

OK, now we can create two groups, hobbits and elves.


Now, let's create a user with power, Gandalf (for our example, let's assume he was given the id of 12).

$this->aauth->create_user('', 'gandalfpass', 'GandalfTheGray');

OK, now we have two groups and three users.

Let's create two permissions walk_unseen and immortality


Ok, now let's give accesses to our groups. The Hobbits seem to have ability to walk unseen, so we will assign that privilage to them. The Elves have imortality, so we will assign that privilage to them. We will assign access with allow_group() function.


Wait a minute! Hobbits should not have immortality. We need to fix this, we can use deny_group() to remove the permission.


Gandalf can also live forever.


Ok now let's check if Hobbits have immortality.

	echo "Hobbits are immortal";
} else {
	echo "Hobbits are NOT immortal";


Hobbits are NOT immortal

Does Gandalf have the ability to live forever?

	echo "Gandalf is immortal";
} else {
	echo "Gandalf is NOT immortal";


Gandalf is immortal

Since we don't accually live in Middle Earth, we are not aware of actual immortality. Alas, we must delete the permission.


It is gone.

Un-authenticated Users

So, how about un-authenticated users? In Aauth they are part of the public group. Let's give them permissions to travel. We will assume we already have a permission set up named travel.


Admin Users

What about the Admin users? The Admin user and any member of the Admin group is a superuser who had access everthing, There is no need to grant additional permissions.

User Parameters/Variables

For each user, variables can be defined as individual key/value pairs.


For example, if you want to store a user's phone number.


To retreive value you will use get_user_var():


Aauth also permits you to define System Variables. These can be which can be accesed by all users in the system.


Private Messages

OK, let's look at private messages. Frodo (id = 3) will send a PM to Legolas (id = 4);

$this->aauth->send_pm(3,4,'New cloaks','These new cloaks are fantastic!')

Banning users

Frodo has broke the rules and will now need to be banned from the system.


You have reached the end of the Quick Start Guide, but please take a look at the detailed Documentation Wiki for additional information.

Don't forget to keep and eye on Aauth, we are constantly improving the system. You can also contribute and help me out. :)