Intent: This document should only be used for defining
the process and programatic approach used to implent an email registration
process for known users. This article aims to outline the business logic
decisions that were made, why, and how they were implemented.
Background: The Registration Process only applies to Communities
with a Centrally Hosted Resident Portal. This is due to how backups are
ran for remote communities. The intention of registering email address is
to enable account recovery options for Resident Portal users. If the user has a
registered email address we are able to send reset links or other user details.
Usage: Upon logging into the Resident Portal, if a user
has an email(4) address populated they will be directed to the Account
Summary page. Otherwise, they will be sent to the My Info page.
This is done to indicate to the user their account information may not be
complete (ie: missing email). The next step is dependent on their reistration
state. There are several Resident values we need to be aware of at this
point.
- email_registration_value
- Current state of registration ("R", "D",
"I", {EMAIL ADDRESS})
- email_registration_expiry
- DateTime in which the token is expired.
- email_registration_token
- Unique token uuid for identifying the user
- email
- users actual email address
We check the email_registration_value for the current
state to decide how to handle the interaction.
email_registration_value:
- null
- if email is also null we will disply a registration dialog. See Process
section below.
- "I"
(ignore) - This means that the user has selected the 'Do not ask me again'
checkbox before. We will not display any dialogs.
- "D"
(deleted) - This means that the user has previously had an email address
populated/registered, and has since deleted it. We will not display any
dialogs.
- {EMAIL
ADDRESS} - this means they are somewhere within the registration process,
but it is incomplete. No dialog is displayed. See Process section below.
- "R"
(registered) - This means they have a valid email address that was
populated by the registration process. These users would not have been
sent here from login.
Options Adding/Updating: From the My Info
page the user has the ability to register a new email address or update an
existing email address. The process when submitting an email is the same,
however depending on their current state they have different other
options.
Adding:
- Close
Dialog - this just hides the dialog and doesn't update any values. Same
result for subsequent logins as above.
- Don't
ask me again - This updates the email_registration_value to "I".
Subsequent logins will still direct to My Info, however no
registration dialog appears.
- Submit
a valid email address - See Process below.
Updating: If an email is populated / registered for
a user, no default dialog will be displayed, however a button will allow them
to update/delete their email.
- Cancel
- close dialog.
- Delete
Email - This will clear the residents email from the account and mark the
email_registration_value to "D" deleted. Subsequent logins will
be directed to My Info, without a prompt dialog.
- Update
- See Process below
Process: This process is triggered whenever a resident
has chosen to enter an email address and submit it.
- After
validation is complete (email/confirm email match) we want to populate the
above mentioned columns.
- email_registration_value
- This is set to the email/confirm email address. This is what will
be used during the registration completion step.
- email_registration_expiry
- Set the dateTime to current time + 1 day. After which the token
is no longer valid and they must make an additional registration request.
- email_registration_token
- We generate a uuid, which will be used during the registration
complet process
- email
- we won't update this yet.
- We
then send an email to the email address they used in the request step.
This email will contain general information about what is being requested,
and provide a clickable link to complete the registration process.
- The
link should look something like
./ResidentSelfServicePortal/completeRegistration?token={uuid}
- Upon
clicking on that link they will navigate to that page where we will do the
following:
- Attempt
to identify the resident that is linked the uuid in the query string,
taking into account the expiry
- If
found, we populate the email column with the current value of
email_registration_value, and update email_registration_value with
"R" for registered, we also delete the
email_registration_token, so it cannot be used again. We leave the expiry,
as proof the process was completed, and when.
- If
not found, we display a token not found error.
- Upon
subsequent user logins, they will be directed to Account Summary