dbsync_app.get_user_info()
Fetch information about a DB Sync user.
Syntax
FUNCTION get_user_info(
user_id dbsync_core.t_user_id,
info dbsync_core.t_user INOUT
)
RETURNS INTEGER
- user_id is the id of the DB Sync user. To get information about the current
authenticated user, pass
"?"
as user id. - info is a
dbsync_core.t_user
record containing user information.
Returns:
- The status.
Usage
The get_user_info()
function can be used to retrieve information about the DB
Sync users.
This is typically used with the GAS/SSO/GIP mode,
to get the OICD SUB (Subject) user id of the current user.
Important:
For security reasons, make sure that the DB Sync client app code only user the
"?"
value for the user_id parameter of the
get_user_info()
function. In the returned record, the user_auth
field will always be NULL
.
Example
DEFINE user_info dbsync_core.t_user
IF dbsync_app.get_user_info("?",user_info) < 0 THEN
DISPLAY "Could not get current user info"
ELSE
DISPLAY "Current user id : ", user_info.user_id
END IF