public override string GetUserNameByEmail (string email)
{
CheckParam ("email", email, 256);
using (DbConnection connection = CreateConnection ()) {
DbCommand command = factory.CreateCommand ();
command.Connection = connection;
command.CommandText = @"aspnet_Membership_GetUserByEmail";
command.CommandType = CommandType.StoredProcedure;
AddParameter (command, "@ApplicationName", ApplicationName);
AddParameter (command, "@Email", email);
DbDataReader reader = command.ExecuteReader ();
string rv = null;
if (reader.Read ())
rv = reader.GetString (0);
reader.Close ();
return rv;
}
}