diff options
author | Chris Cornutt <chris.cornutt@hp.com> | 2015-01-16 16:35:19 -0600 |
---|---|---|
committer | Chris Cornutt <chris.cornutt@hp.com> | 2015-01-16 16:35:19 -0600 |
commit | a9a0564f45ab9a9d8a22515e78ee6f9fe5624e51 (patch) | |
tree | ad4295f6d420cc77c681831f31b8f949755ede33 | |
parent | e2e01ef512691e8bdac9e9e637f9847c15ea9890 (diff) | |
download | gatekeeper-1.5.zip gatekeeper-1.5.tar.gz gatekeeper-1.5.tar.bz2 |
adding to docs about create user with groups1.5
-rw-r--r-- | docs/users.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/users.md b/docs/users.md index a1d98a3..ad83338 100644 --- a/docs/users.md +++ b/docs/users.md @@ -68,6 +68,26 @@ Gatekeeper::register($credentials); **NOTE:** The permissions by the name/id you use must exist *before* the user, otherwise the link is not created. +You can also create groups the same way: + +```php +<?php +$credentials = array( + 'username' => 'ccornutt', + 'password' => 'test1', + 'email' => 'ccornutt@phpdeveloper.org', + 'first_name' => 'Chris', + 'last_name' => 'Cornutt' +); +// Use can use permission names +$credentials['groups'] = array('group1', 'group2'); +// or use IDs +$credentials['groups'] = array(1, 2); + +Gatekeeper::register($credentials); +?> +``` + ## Removing users Deleteing user records can be done with the `deleteUserById` method: |