Skip to content

5) Group Operations

Raphael Jackstadt edited this page Dec 8, 2016 · 4 revisions

Groups are most important part of Aauth
First you must know groups settings can be changed from Aauth config file (we recomend not to change) 'admin_group' => 'Admin' is group name of admin
'default_group' => 'Default' is for new users
'public_group' => 'Public' for whom not logged in

In Aauth, Users can have more than one group.
Admin has all rights

lets look at functions

create_group($group_name, $definition='')

creates a group with the given group name and an optional description and returns the new group id.

update_group($group_id, $group_name)

updates group using group_id


deletes group

add_member($user_id, $group_par)

adds member to a group. group_par can be group id or group name

remove_member($user_id, $group_par)

get given user out of given group.

is_member($group_par, $user_id=FALSE)

returns true if current user member of given group, orherwise false


returns true if current user is admin
Remember! you can change admin's group from Aauth config file


returns list of groups as an object


returns name of a group


returns id of group by taking group_par(id or name of group)

Aauth Version 2 has been released

Some functions has changed. Dont forget to scan the new features and functions from Wiki

Clone this wiki locally
You can’t perform that action at this time.