RevalidatePassword function
Syntax
RevalidatePassword()
Description
Use the RevalidatePassword function to revalidate the password that the current user used to sign onto the PeopleSoft application.
Note:
In certain scenarios such as LDAP authentication and depending on the implementation, the user ID used for sign-in might differ from the operator ID of user profile in effect after sign-in. RevalidatePassword automatically accounts for this and requests revalidation based on the sign-in ID.
This function displays a window similar to the following prompting the user for the same password that the user signed onto the PeopleSoft application:

Returns
Returns a numeric value or a constant: you can check for either.
| Value | Constant | Meaning |
|---|---|---|
|
0 |
%RevalPW_Valid |
Password Validated |
|
1 |
%RevalPW_Failed |
Password Validation Check Failed |
|
2 |
%RevalPW_Cancelled |
Password Validation Cancelled |
Example
RevalidatePassword is commonly used in the SaveEdit PeopleCode to verify that the user entering the data is the same as the one who signed onto the PeopleSoft application.
&TESTOP = RevalidatePassword();
Evaluate &TESTOP
/* Password does not match the current user's password */
When 1
Error MsgGet(48, 18, "Message not found: This password does not match the current value.");
Break;
End-Evaluate;
Restrictions on Use in PeopleCode Events
Control does not return to the line after RevalidatePassword until after the user has filled in a value or pressed ENTER. This interruption of processing makes RevalidatePassword a “think-time” function which means that it shouldn’t be used in any of the following PeopleCode events:
-
SavePreChange.
-
Workflow.
-
RowSelect.
-
SavePostChange.
-
Any PeopleCode event that fires as a result of a ScrollSelect (or one of its relatives) function calls, or a Select (or one of its relatives) Rowset class method.
Restrictions on Use in Signon PeopleCode
RevalidatePassword does not work in Signon PeopleCode. If you use this function in Signon PeopleCode, you create an infinite loop.