summaryrefslogtreecommitdiffstats
path: root/docs/users.md
diff options
context:
space:
mode:
authorChris Cornutt <chris.cornutt@hp.com>2014-12-16 11:37:32 -0600
committerChris Cornutt <chris.cornutt@hp.com>2014-12-16 11:37:32 -0600
commit694ea9249e2a76074ab655015a878ec567aea2ef (patch)
treedaa1e0782332a218b84e41d076132a6b5ff2b6e2 /docs/users.md
parenta3609d2014a5d4f79b621e40495ac02d859a47d8 (diff)
downloadgatekeeper-694ea9249e2a76074ab655015a878ec567aea2ef.zip
gatekeeper-694ea9249e2a76074ab655015a878ec567aea2ef.tar.gz
gatekeeper-694ea9249e2a76074ab655015a878ec567aea2ef.tar.bz2
adding delete info to the User docs
Diffstat (limited to 'docs/users.md')
-rw-r--r--docs/users.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/users.md b/docs/users.md
index d1bd21b..dba3a32 100644
--- a/docs/users.md
+++ b/docs/users.md
@@ -73,6 +73,23 @@ $user = Gatekeeper::findUserByFirstName('Chris');
?>
```
+## Deleting Users
+
+You can delete users in much the same way you can find them. It's usually the best idea to use the `ID` (primary key) value if you're wanting to delete a specific user as that will definitely only find one user.
+
+```php
+<?php
+// This will delete the one user by ID
+Gatekeeper::deleteUserById(1);
+
+// If there's more than one "Chris" this will return false
+Gatekeeper::deleteUserByFirstName('Chris');
+
+?>
+```
+
+If you provide details and the system finds more than one record matching it, it will return `false` and not perform the `delete` operation.
+
## Activating/Deactivating Users
You can mark a user as active or inactive in the system easily. Inactive users will not be able to log in using the `authenticate` method. Changing the user status is easy: