PswID
PswID() -> cIdReads the positioned legacy user or group ID
Overview
Reads the user or group identifier after a successful PswSeek. PswOrder and the user/group search choice define context. It does not automatically identify the authenticated session and does not replace authorization. The block illustrates reading without positioning or printing user data. (Sources: refs. 1–1.)
Syntax
PswID() -> cIdReturn value
Character: ID in the positioned context.
Commented example
#Include "Protheus.ch"
User Function Ed602()
// Uninvoked block: requires authorized context and credentials.
Local bRead := {|| PswID()}
ConOut(ValType(bRead))
Return NilCreates a block (type B), without querying, authenticating or changing users. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Historical reference: verify API, permissions and context for the target release. Never log credentials or user arrays.
- Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.