cUsuarioUser supplied by caller.
AdvPL GuidePswAdmin(cUsuario,cSenha) -> nRetChecks legacy administrator membership
The historical manual documents 0 for administrators, 1 for nonadministrators and 2 for an invalid password. Do not interpret the numeric result as a Boolean. This is a function despite its legacy queue classification as a class. The uninvoked block compares with zero and receives credentials from its caller. This old reference does not establish MFA, SSO, token support or current release authentication behavior. (Sources: refs. 1–1.)
PswAdmin(cUsuario,cSenha) -> nRetcUsuarioUser supplied by caller.
cSenhaRuntime password; never log it.
Numeric: 0, 1 or 2 in the historical reference.
#Include "Protheus.ch"
User Function Ed600()
// Uninvoked block: requires authorized context and credentials.
Local bRead := {|cUser,cSecret| PswAdmin(cUser,cSecret) == 0}
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.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.