When a user registers an account and then is enrolled in a course by the instructor before completing the email validation, the course shows up in the dashboard of the unverified, logged-in user. This contrasts with the behavior observed when the user is enrolled before the account is created - the user is unable to see the enrolled course before verifying the email address.
This PR adds a check for the email validation before enrolling the user.
*JIRA tickets*: None
*Sandbox URL*: TBD - sandbox is being provisioned.
*Merge deadline*: None
1. Register and create a new account in the LMS. Do not verify the email address.
1. Stay logged in as that user.
1. Enroll the user created in the previous step, in a course via the Instructor dashboard in a separate, isolated browser session.
1. Refresh the dashboard of the logged-in user with unverified email address. Without the fix, the enrolled course shows up in the user's dashboard . With the fix, the course shows up in the unverified user's dashboard only after the email verification is done.
While the unverified user can still navigate to the public courses and enroll, this issue breaks the expected behaviour with invitation-only (and optionally, private) courses.
[ ] @Agrendalath
[ ] edX reviewer[s] TBD