Open Closed

Users unable to verify email when it is readonly #6491


User avatar
0
Josh.Cunningham created

When the "Allow users to change their email addresses" Identity Management setting is disabled users are not able to verify their email in the "Personal info" tab of the "Account" page.

Our site is quite tightly controlled and users are created by an administrator and not able to change their email. There also doesn't appear to be a way for administrators to trigger this email on behalf of a user that I can see.

I am aware that if we require emails to be verified then they would be able to verify it on login but at present we do not want this.

Is there any way to configure this so that the user is able to verify their email but not change it?

Currently I am working around the issue using the following javascript (any comments, criticisms or suggestions would be appreciated):

$(function () {
    const $email = $('#PersonalSettingsForm').find("#Email")

    if ($email) {
        if ($email.parent().find("#VerifyEmailButton").length == 0 && $email.attr("data-email-verified") === "False") {
            $email[0].insertAdjacentHTML('afterend', `
                <button id="VerifyEmailButton" style="" class="btn btn-warning" type="button" data-busy-text="Processing...">
                    <i class="me-1 fa fa-vcard"></i> Verify
                </button>
            `);
        }

        if ($email.parent().find("#EmailVerified").length == 0 && $email.attr("data-email-verified") === "True") {
            $email[0].insertAdjacentHTML('afterend', `
                <span class="input-group-text" id="EmailVerified" style="">
                    <i class="me-1 text-success fa fa-check-square"></i><span class="text-success">Verified</span>
                </span>
            `);
        }
    }
});
  • ABP Framework version: v7.3.2
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    We will allow to send the EmailConfirmationToken even if the user can't update their email address in the next version.

    Thank you for your feedback.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Your question credit has been refunded.

  • User Avatar
    0
    Josh.Cunningham created

    Thank you very much

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09