Oracle9iAS Portal Developer Kit

get_user function

Contained in package wwctx_api.

Call this function to get the name of the Oracle Portal user currently logged in.

Note: Use the returned name for logging and authorization checks.

function get_user

return varchar2;

Version: Oracle Portal 3.0.6.6.5 or later

Returns:

This function returns the user name of the current Oracle Portal user.

Exceptions:

  • If no session was found, a NO_SESSION_EXCEPTION is raised.

  • If an undefined error occurs, a GENERAL_CONTEXT_EXCEPTION is raised.

Example:

This example returns TRUE if the current Oracle Portal user is the Portal schema owner. It returns FALSE otherwise.

begin

if wwctx_api.get_user = wwctx_api.get_product_schema then

return TRUE;

else

return FALSE;

end if;

end;

Related topics

The PL/SQL API Reference is part of the Portal Developer Kit on Portal Studio