May 31, 2019 03:04 AM|Brando ZWZ|LINK
As far as I know, the last part of the article is use sha1 with slat generate the encrypted passwrod.
If you don't want to encrypt the password firstly, then store it into the database, there is no need to copy the last part codes.
You could modify the validate codes as below:
bool ValidateUser(string user, string pass)
string connStr = ConfigurationManager.ConnectionStrings["Main"].ConnectionString;
using (SqlConnection conn = new SqlConnection(connStr))
string sql = "select email from users where email = @email and password = @password";
SqlCommand cmd = new SqlCommand(sql, conn);
return cmd.ExecuteScalar() is string;