Code: Select all
requiresUniqueEmail="true"
Code: Select all
requiresUniqueEmail="true"
Code: Select all
public static bool CheckUserEmail(string useremail)
{
string sql = "SELECT email FROM aspnet_membership WHERE email='" + useremail + "';";
using (PgSqlConnection connection = ConnectionManager.GetConnection())
{
using (PgSqlCommand command = new PgSqlCommand(sql, connection))
{
command.CommandType = CommandType.Text;
try
{
string rec = command.ExecuteScalar().ToString();
if (rec == useremail)
return true;
else
return false;
}
catch (Exception ex)
{
return false;
throw ex;
}
}
}
}