GET-SAFE-USER( ) method

This method only applies to a Progress Application Server (PAS) for OpenEdge application server.

Returns the handle to a copy of the sealed client-principal object that represents the safe user identity for the specified multi-tenant database connection. The application is responsible for deleting the handle object when done. If the Safe User ID feature is disabled for the specified database, the method returns the Unknown (?) value.

Return-type: HANDLE

Applies to: SECURITY-POLICY system handle

Syntax

GET-SAFE-USER ( logical-db-name ) 
logical-db-name

The logical name of the database from which you want to retrieve the safe user identity. The logical database name must be a character string enclosed in quotes, or a character expression.

The following example code shows how to call the GET-SAFE-USER() method.

DEFINE VARIABLE hCP AS HANDLE NO-UNDO.

hCP = SECURITY-POLICY:GET-SAFE-USER(LDBNAME(1)).
IF hCP = ? 
THEN 
  MESSAGE "Database is not configured to use the Safe User ID feature".
ELSE DO:
  MESSAGE "Database is configured to use the Safe User ID feature".
  DELETE OBJECT hCP.  // clean up the object
END.

See also

SET-SAFE-USER( ) method

Overview of Safe User ID in Learn about Identity Management