create_user(request,
uname,
passwd,
aname_or_id_list,
options={ } )
|
|
Creates (given) username and allocates given address(es).
Examples:
>>> u_attrs = s.create_user(uname='user1', passwd='secret',
aname_or_id_list=['user1@bscw.de', 'user1@web.de'])
>>> u_attrs = s.create_user(uname='user2', passwd='secret',
aname_or_id_list=['1234', 'user2@bscw.de'])
>>> u_attrs = s.create_user(uname='user3', passwd='secret',
aname_or_id_list=['user3@bscw.de'],
options={'o_attrs': ['name', '__id__']})
- Parameters:
uname (str) - user name to be created
passwd (str) - password
aname_or_id_list (list) - list of address(es) or ID(s) of address objects to be allocated
to the user (first address will become primary address)
options (dict) - dictionary with the following key/value parameter(s):
-
o_attrs (list) - list of user attributes
to be returned, e.g. ['__id__', 'ctime', 'atime',
'addresses', ...] (see get_attributes() for details)
- Returns: dict
-
dictionary of created user object attributes
-
raises fault
(10104, 'Bad Parameter')
|