summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorChris Cornutt <enygma@phpdeveloper.org>2014-12-12 21:40:04 -0600
committerChris Cornutt <enygma@phpdeveloper.org>2014-12-12 21:40:04 -0600
commit921661e409a9078bf86d9d4cb6cde70e1733a061 (patch)
treedc805d8829975d60edddc96d100d565e45be841b /docs
parente981e3032de9db68f3fd594db8273089889e6961 (diff)
downloadgatekeeper-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.md14
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!';
+}
+?>
+```