I have configured our website to use the UpmMember****p provider with
the requiresApproval attribute set to true and then added the ASP.NET
Login control to our login page with the Member****pProvider property
set to UpmProvider.
When users are created in the profile store, the account status (when
viewed using the "Customer and Orders Manager") is set to "Requires
Approval" as expected.
However, users that have an account status of "Requires Approval" are
still able to login to the web site using the standard ASP.Net 2.0
Login control.
I would have expected the login control to automatically block these
unapproved users from logging in (and for the ValidateUser method to
return false) until their account status is set to Active .
n.b. As a workaround, I have overriden the OnLoggingIn method of the
Login control in order to interrogate the Account Status property of
the user profile via the CS profile system and cancel the login if it
is not set to "Approved".
Is there a configuration step I am missing ?
Our web.config includes the following entries:
<userProfile
profileDefinition="UserObject"
userIdProperty="GeneralInfo.user_id"
organizationIdProperty="AccountInfo.org_id"
catalogSetIdProperty="AccountInfo.user_catalog_set"
userIdSource = "ASP.Net"
userIdKey = "GeneralInfo.email_address"
userIdTarget = "GeneralInfo.user_id"
/>
<member****p defaultProvider="UpmProvider" userIsOnlineTimeWindow="15">
<providers>
<add
name="UpmProvider" type="Microsoft.CommerceServer.Runtime.Profiles.UpmMember****pProvider"
logonNameProperty="GeneralInfo.email_address"
maxInvalidPasswordAttempts="5"
passwordAttemptWindow="10"
passwordLockoutPeriod="0"
requiresApproval="true"
writeExceptionsToEventLog="true"
minRequiredPasswordLength="5"
minRequiredNonalphanumericCharacters="0"
requiresQuestionAndAnswer="false"
enablePasswordReset="true"
enablePasswordRetrieval="true"
requiresUniqueEmail="true"
passwordFormat="Clear" />
</providers>
</member****p>
Our profile contains the following field:
AccountInfo.account_status
The following site terms are set up:
Name Display Name
2 Requires Approval
1 Active Account
0 Inactive