Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Membership/fb - Add Membership functionality (live site users) to the repository #88

Open
wants to merge 69 commits into
base: finished
Choose a base branch
from

Conversation

kentico-matthews
Copy link
Contributor

Motivation

Demonstrate membership functionality

kentico-matthews and others added 30 commits November 7, 2024 11:39
…rvice, extend the MemberInfo class to reflect custom fields
…ignOut to Sign in page; render LinkOrSignOut widget in the header (TODO: retrieve the Sign in page. For now it only shows up if user is authenticated)
…add signed-in status check before rendering registration form
… same contact does not get associated with a different member if someone else logs in in the same browser session
src/TrainingGuides.Web/ComponentIdentifiers.cs Outdated Show resolved Hide resolved
},
Request.Scheme) ?? string.Empty;

await emailService.SendEmail(new EmailMessage()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you've confirmed that the preferred language is in context, you can add a localizer to the text of these email fields

case EmailConfirmationState.FailureConfirmationFailed:
<h4 test-id="confirmationMessage" class="text-center k-dot">@Model.Message</h4>

<form id="resendVerificationForm" method="post" asp-controller="Registration" asp-action="ResendVerificationEmail">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it is now, the only way for them to resent the confirmation email is to follow the link in the first email
Should we include some kind of path for when a registrant loses the first email?

}
if (!string.IsNullOrWhiteSpace(guidesMember.FavoriteCoffee))
{
_ = newContact.SetValue("TrainingGuidesContactFavoriteCoffee", guidesMember.FavoriteCoffee);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would vote for making the "TrainingGuidesContactFavoriteCoffee" and the "TrainingGuidesContactMemberId" constants somewhere. "TrainingGuidesContactMemberId" is being used twice, so it makes a lot of sense to prevent stupid typo errors in the future. And to me it will read easier if the favorite coffee is consistent with that.


namespace TrainingGuides.Web.Features.Membership.Controllers;

public class RegistrationController(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed, that we are using two different ways of assigning the private readonly properties - when you compare this controllers with the others. E.g., Authentication or Cookies. Do you think it's worth it to make it consistent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants