Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

PswName

PswName(cSenha) -> lOk

Checks a password against a positioned legacy user

PswNameAdvPL
01 · OVERVIEW

Overview

Despite its name, the historical reference describes password verification, not reading a user name. A successful PswSeek must establish context first. The block is not invoked and contains no password. Do not expose it as a password-guessing endpoint; current authentication and lockout rules require the environment contract. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

PswName(cSenha) -> lOk

Parameters

cSenha
CharacterRequired

Caller password, not persisted by the example.

Return value

Verification Boolean in the historical reference.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed603()
    // Uninvoked block: requires authorized context and credentials.
    Local bRead := {|cSecret| PswName(cSecret)}
    ConOut(ValType(bRead))
Return Nil
Expected result

Creates 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.

BEST PRACTICES
  • 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.

Related content

REFERENCES
  1. AdvPL — O Manual. Referência histórica, p. 366. Contrato atual não homologado. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha