Do this:
Create an new account in ur database,remember to leave the password blank.
Now,login with that acc,set the password to whatever. Now,go into ur database (mysql / phpmyadmin , doesnt matter ) ,then go into the account ur just created,and see,is there any password at the password field,or is it blank?
edit:
if its blank,do this:
Search for :
Quote:
Will bring you into database.cs.
Okay,now, mark from public static byte Auth....... ,to
Quote:
|
catch (Exception Exc) { General.WriteLine(Exc.ToString()); return 0; }
|
Now,what you have marked,delete that and input this:
Quote:
public static byte Authenticate(string UserName, string Password)
{
try
{
MySqlDataAdapter DataAdapter = null;
DataAdapter = new MySqlDataAdapter("SELECT * FROM `Accounts` WHERE `AccountID` = '" + UserName + "'", Connection);
DataSet DSet = new DataSet();
DataAdapter.Fill(DSet, "Account");
if (DSet != null && DSet.Tables["Account"].Rows.Count > 0)
//if (DSet.Tables["Account"].Rows.Count > 0)
{
DataRow DR = DSet.Tables["Account"].Rows[0];
string Pass = (string)DR["Password"];
if (Pass == Password || Pass == "")
{
if (Pass == "")
{
MySqlCommand Command = new MySqlCommand("UPDATE `Accounts` SET `Password` = '" + Password + "' WHERE `AccountID` = '" + UserName + "'", Connection);
Command.ExecuteNonQuery();
}
uint LogonCount = (uint)DR["LogonCount"];
LogonCount++;
MySqlCommand Comm = new MySqlCommand("UPDATE `Accounts` SET `LogonCount` = " + LogonCount + " WHERE `AccountID` = '" + UserName + "'", Connection);
Comm.ExecuteNonQuery();
return Convert.ToByte((uint)DR["LogonType"]);
}
else
return 0;
}
else
return 0;
}
catch (Exception Exc) { General.WriteLine(Exc.ToString()); return 0; }
|
Now,if any error comes up,its something with the brackets,just play around with them..
I think this COULD be the problem,if this doesnt fix it,then im not sure what would.
Emme