diff options
author | Chris Cornutt <enygma@phpdeveloper.org> | 2015-06-06 17:32:50 -0500 |
---|---|---|
committer | Chris Cornutt <enygma@phpdeveloper.org> | 2015-06-06 17:32:50 -0500 |
commit | 4a0ce94472e4cdc65d9b7dcb5a3544f50fc52eb4 (patch) | |
tree | 4532ade64a1217bc68dbe455f419b05adff01ffd | |
parent | c409335a432cbe17fdcea32773a8d51ae72f77f3 (diff) | |
download | gatekeeper-4a0ce94472e4cdc65d9b7dcb5a3544f50fc52eb4.zip gatekeeper-4a0ce94472e4cdc65d9b7dcb5a3544f50fc52eb4.tar.gz gatekeeper-4a0ce94472e4cdc65d9b7dcb5a3544f50fc52eb4.tar.bz2 |
updating groups and users docs for the find*s methods
-rw-r--r-- | docs/groups.md | 11 | ||||
-rw-r--r-- | docs/users.md | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/docs/groups.md b/docs/groups.md index 7aa60cb..dc26d94 100644 --- a/docs/groups.md +++ b/docs/groups.md @@ -11,6 +11,17 @@ Groups are represented as objects in the Gatekeeper system with the following pr Gatekeeper also supports hierarchical groups (see below). +## Getting All Groups + +You can use the `findGroupss` method on the `Gatekeeper` class to get a list (returnes a `GroupCollection`) of the current groups: + +```php +$groups = Gatekeeper::findGroups(); + +// You can then slice it up how you need, like getting the first three +$shortGroupList = $groups->slice(1, 3); +``` + ## Creating a Group Making a new group is as easy as making a new user. One thing to note, the *group name* must be **unique**: diff --git a/docs/users.md b/docs/users.md index 5473910..d20ea24 100644 --- a/docs/users.md +++ b/docs/users.md @@ -28,6 +28,17 @@ echo 'Full name: '.$user->firstName.' '.$user->lastName."\n"; ?> ``` +## Getting All Users + +You can use the `findUsers` method on the `Gatekeeper` class to get a list (returnes a `UserCollection`) of the current users: + +```php +$users = Gatekeeper::findUsers(); + +// You can then slice it up how you need, like getting the first three +$shortUserList = $users->slice(1, 3); +``` + ## Creating Users To create a user, you only need to provide the user details to the `register` method: |