summaryrefslogtreecommitdiff
path: root/docs/gl_objects/users.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/gl_objects/users.rst')
-rw-r--r--docs/gl_objects/users.rst26
1 files changed, 10 insertions, 16 deletions
diff --git a/docs/gl_objects/users.rst b/docs/gl_objects/users.rst
index e520c9b..e57daf6 100644
--- a/docs/gl_objects/users.rst
+++ b/docs/gl_objects/users.rst
@@ -89,29 +89,23 @@ References
Examples
--------
-List custom attributes for a user:
+List custom attributes for a user::
-.. literalinclude:: users.py
- :start-after: # ca list
- :end-before: # end ca list
+ attrs = user.customattributes.list()
-Get a custom attribute for a user:
+Get a custom attribute for a user::
-.. literalinclude:: users.py
- :start-after: # ca get
- :end-before: # end ca get
+ attr = user.customattributes.get(attr_key)
-Set (create or update) a custom attribute for a user:
+Set (create or update) a custom attribute for a user::
-.. literalinclude:: users.py
- :start-after: # ca set
- :end-before: # end ca set
+ attr = user.customattributes.set(attr_key, attr_value)
-Delete a custom attribute for a user:
+Delete a custom attribute for a user::
-.. literalinclude:: users.py
- :start-after: # ca list
- :end-before: # end ca list
+ attr.delete()
+ # or
+ user.customattributes.delete(attr_key)
User impersonation tokens
=========================