Skip to content

/AWS1/IF_WKR=>GETUSER()

About GetUser

Retrieves detailed information about a specific user in a Wickr network, including their profile, status, and activity history.

Method Signature

METHODS /AWS1/IF_WKR~GETUSER
  IMPORTING
    !IV_NETWORKID TYPE /AWS1/WKRNETWORKID OPTIONAL
    !IV_USERID TYPE /AWS1/WKRUSERID OPTIONAL
    !IV_STARTTIME TYPE /AWS1/WKRTIMESTAMP OPTIONAL
    !IV_ENDTIME TYPE /AWS1/WKRTIMESTAMP OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wkrgetuserresponse
  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.

iv_userid TYPE /AWS1/WKRUSERID /AWS1/WKRUSERID

The unique identifier of the user to retrieve.

Optional arguments:

iv_starttime TYPE /AWS1/WKRTIMESTAMP /AWS1/WKRTIMESTAMP

The start time for filtering the user's last activity. Only activity after this timestamp will be considered. Time is specified in epoch seconds.

iv_endtime TYPE /AWS1/WKRTIMESTAMP /AWS1/WKRTIMESTAMP

The end time for filtering the user's last activity. Only activity before this timestamp will be considered. Time is specified in epoch seconds.

RETURNING

oo_output TYPE REF TO /aws1/cl_wkrgetuserresponse /AWS1/CL_WKRGETUSERRESPONSE

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->getuser(
  iv_endtime = '20150101000000.0000000'
  iv_networkid = |string|
  iv_starttime = '20150101000000.0000000'
  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_sensitivestring = lo_result->get_firstname( ).
  lv_sensitivestring = lo_result->get_lastname( ).
  lv_genericstring = lo_result->get_username( ).
  lv_boolean = lo_result->get_isadmin( ).
  lv_boolean = lo_result->get_suspended( ).
  lv_integer = lo_result->get_status( ).
  lv_integer = lo_result->get_lastactivity( ).
  lv_integer = lo_result->get_lastlogin( ).
  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.
ENDIF.

Get user information

Get user information

DATA(lo_result) = lo_client->getuser(
  iv_networkid = |12345678|
  iv_userid = |12345|
).

Get user info with activity time range

Get user info with activity time range

DATA(lo_result) = lo_client->getuser(
  iv_endtime = '20240117140000.0000000'
  iv_networkid = |12345678|
  iv_starttime = '20240101000000.0000000'
  iv_userid = |12345|
).

User not found error

User not found error

DATA(lo_result) = lo_client->getuser(
  iv_networkid = |12345678|
  iv_userid = |99999|
).

Invalid userId error

Invalid userId error

DATA(lo_result) = lo_client->getuser(
  iv_networkid = |12345678|
  iv_userid = |99999|
).