If you use the SqlMembershipProvider
, you could select them manually, either as plain sql-statement(e.g. via ADO.NET
) or by creating a custom stored-procedure which also supports paging and the ApplicationId
and where you can parameterize IsApproved
.
SELECT m.IsApproved, u.UserName,
m.Email, m.PasswordQuestion, m.Comment,
m.CreateDate, m.LastLoginDate, u.LastActivityDate,
m.LastPasswordChangedDate, u.UserId,
m.IsLockedOut, m.LastLockoutDate
FROM dbo.aspnet_Membership m, dbo.aspnet_Users u
WHERE u.UserId = m.UserId
AND m.IsApproved = @IsApproved
ORDER BY u.UserName
Just have a look at dbo.aspnet_Membership_GetAllUsers
, copy paste the relevant parts and modify it accordingly.