Newer Version Available
VerificationResult Class
Stores the result of the System.UserManagement.verifySelfRegistration method. The method returns the result
of a verification challenge that you invoke when you create your own Verify page. It contains
the verification status and session ID if the user is created successfully.
Namespace
Usage
When users sign up for your community with an email address or
phone number, Salesforce sends them a verification code and generates the Verify page for
users to confirm their identity. To replace the Salesforce Verify page with your own, use the
initSelfRegistration and verifySelfRegistration methods. initSelfRegistration initiates a verification challenge and
includes a user object to be inserted after successful registration. verifySelfRegistration completes the verification, and if
successful, the user is created and logged in. The method returns the verification result,
which contains the verification status and session ID if the user is created.
Example
VerificationResult Constructor
VerificationResult has the following constructor.
VerificationResult(redirect, success, message)
Creates an instance of the VerificationResult class that contains the verification result from System.UserManagement.verifySelfRegistration.
Signature
public VerificationResult(System.PageReference redirect, Boolean success, String message)
Parameters
- redirect
- Type: System.PageReferenceSystem.PageReference
- Where user is directed upon successful verification.
- success
- Type: Boolean
- Indicates whether verification succeeded.
- message
- Type: String
- Message that displays as a result of a verification challenge.
VerificationResult Properties
The following are properties for VerificationResult.
message
Message that displays as a result of a verification challenge.
SUCCESS if the identity verification is successful. Other values are FAILURE, PENDING,
RATE_LIMITED, or FAILURE_REPORT.
Signature
public String message {get; set;}
Property Value
Type: String
redirect
Signature
public System.PageReference redirect {get; set;}
Property Value
Type: System.PageReferenceSystem.PageReference
VerificationResult Method
VerificationResult has the following method.