diff options
author | Chris Cornutt <enygma@phpdeveloper.org> | 2014-12-12 21:40:04 -0600 |
---|---|---|
committer | Chris Cornutt <enygma@phpdeveloper.org> | 2014-12-12 21:40:04 -0600 |
commit | 921661e409a9078bf86d9d4cb6cde70e1733a061 (patch) | |
tree | dc805d8829975d60edddc96d100d565e45be841b /docs | |
parent | e981e3032de9db68f3fd594db8273089889e6961 (diff) | |
download | gatekeeper-921661e409a9078bf86d9d4cb6cde70e1733a061.zip gatekeeper-921661e409a9078bf86d9d4cb6cde70e1733a061.tar.gz gatekeeper-921661e409a9078bf86d9d4cb6cde70e1733a061.tar.bz2 |
adding the inGroup information to the docs
Diffstat (limited to 'docs')
-rw-r--r-- | docs/groups.md | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/docs/groups.md b/docs/groups.md index a9ec164..d02ff41 100644 --- a/docs/groups.md +++ b/docs/groups.md @@ -38,4 +38,16 @@ foreach ($users as $user) { echo 'Username: '.$user->username."\n"; } ?> -```
\ No newline at end of file +``` + +## Checking to see if a user is in a group + +You can use the `inGroup` method to check and see if a user ID is in a group: + +```php +<?php +if (Gatekeeper::findGroupById(1)->inGroup(1) === true) { + echo 'User is in the group!'; +} +?> +``` |