/AWS1/IF_WKR=>UPDATEUSER()¶
About UpdateUser¶
Updates the properties of an existing user in a Wickr network. This operation allows you to modify the user's name, password, security group membership, and invite code settings.
codeValidation, inviteCode, and inviteCodeTtl are restricted to networks under preview only.
Method Signature¶
METHODS /AWS1/IF_WKR~UPDATEUSER
IMPORTING
!IV_NETWORKID TYPE /AWS1/WKRNETWORKID OPTIONAL
!IV_USERID TYPE /AWS1/WKRUSERID OPTIONAL
!IO_USERDETAILS TYPE REF TO /AWS1/CL_WKRUPDATEUSERDETAILS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wkrupdateuserresponse
RAISING
/AWS1/CX_WKRBADREQUESTERROR
/AWS1/CX_WKRFORBIDDENERROR
/AWS1/CX_WKRINTSERVERERROR
/AWS1/CX_WKRRATELIMITERROR
/AWS1/CX_WKRRESNOTFOUNDERROR
/AWS1/CX_WKRUNAUTHORIZEDERROR
/AWS1/CX_WKRVALIDATIONERROR
/AWS1/CX_WKRCLIENTEXC
/AWS1/CX_WKRSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_networkid TYPE /AWS1/WKRNETWORKID /AWS1/WKRNETWORKID¶
The ID of the Wickr network containing the user to update.
iv_userid TYPE /AWS1/WKRUSERID /AWS1/WKRUSERID¶
The unique identifier of the user to update.
Optional arguments:¶
io_userdetails TYPE REF TO /AWS1/CL_WKRUPDATEUSERDETAILS /AWS1/CL_WKRUPDATEUSERDETAILS¶
An object containing the user details to be updated, such as name, password, security groups, and invite code settings.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_wkrupdateuserresponse /AWS1/CL_WKRUPDATEUSERRESPONSE¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->updateuser(
io_userdetails = new /aws1/cl_wkrupdateuserdetails(
it_securitygroupids = VALUE /aws1/cl_wkrsecgroupidlist_w=>tt_securitygroupidlist(
( new /aws1/cl_wkrsecgroupidlist_w( |string| ) )
)
iv_codevalidation = ABAP_TRUE
iv_firstname = |string|
iv_invitecode = |string|
iv_invitecodettl = 123
iv_lastname = |string|
iv_username = |string|
)
iv_networkid = |string|
iv_userid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_userid = lo_result->get_userid( ).
lv_networkid = lo_result->get_networkid( ).
LOOP AT lo_result->get_securitygroupids( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_securitygroupid = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_sensitivestring = lo_result->get_firstname( ).
lv_sensitivestring = lo_result->get_lastname( ).
lv_genericstring = lo_result->get_middlename( ).
lv_boolean = lo_result->get_suspended( ).
lv_integer = lo_result->get_modified( ).
lv_integer = lo_result->get_status( ).
lv_genericstring = lo_result->get_invitecode( ).
lv_integer = lo_result->get_inviteexpiration( ).
lv_boolean = lo_result->get_codevalidation( ).
ENDIF.
Update user information¶
Update user information
DATA(lo_result) = lo_client->updateuser(
io_userdetails = new /aws1/cl_wkrupdateuserdetails(
it_securitygroupids = VALUE /aws1/cl_wkrsecgroupidlist_w=>tt_securitygroupidlist(
( new /aws1/cl_wkrsecgroupidlist_w( |BCTY8Qhe| ) )
( new /aws1/cl_wkrsecgroupidlist_w( |DEPT001| ) )
)
iv_firstname = |Jonathan|
iv_lastname = |Doe|
iv_username = |john.doe@example.com|
)
iv_networkid = |12345678|
iv_userid = |12345|
).
Update user with invite code¶
Update user with invite code
DATA(lo_result) = lo_client->updateuser(
io_userdetails = new /aws1/cl_wkrupdateuserdetails(
iv_codevalidation = ABAP_TRUE
iv_firstname = |Jane|
iv_invitecode = |NEWINVITE789|
iv_invitecodettl = 14
iv_lastname = |Smith|
iv_username = |jane.smith@example.com|
)
iv_networkid = |12345678|
iv_userid = |12345|
).
User not found error¶
User not found error
DATA(lo_result) = lo_client->updateuser(
io_userdetails = new /aws1/cl_wkrupdateuserdetails(
iv_firstname = |Non|
iv_lastname = |Existent|
iv_username = |nonexistent@example.com|
)
iv_networkid = |12345678|
iv_userid = |99999|
).
Invalid userId error¶
Invalid userId error
DATA(lo_result) = lo_client->updateuser(
io_userdetails = new /aws1/cl_wkrupdateuserdetails(
it_securitygroupids = VALUE /aws1/cl_wkrsecgroupidlist_w=>tt_securitygroupidlist(
( new /aws1/cl_wkrsecgroupidlist_w( |BCTY8Qhe| ) )
)
iv_firstname = |John|
iv_lastname = |Doe|
iv_username = |john.doe@example.com|
)
iv_networkid = |12345678|
iv_userid = |99999|
).