public override bool CheckUserPassword(string user, string password) { DataCommand cmd = _catalog.NewQuery(string.Format("SELECT count(*) FROM {2}user LEFT JOIN {2}usergroup ON {2}user.usergroupid={2}usergroup.usergroupid WHERE {2}user.username='******' AND {2}user.password=MD5(CONCAT(MD5('{1}'), salt)) AND {2}usergroup.forumpermissions!=0", DataCommand.MakeSqlSafe(user.ToLowerInvariant()), DataCommand.MakeSqlSafe(password), _tablePrefix)); long count = cmd.ReadAsLong() ?? 0; return(count > 0); }
public override bool CheckUserPassword(string user, string password) { DataCommand cmd = _catalog.NewQuery(string.Format("SELECT count(*) FROM {2}user WHERE {2}user.username = '******' AND {2}user.password = MD5('{1}')", DataCommand.MakeSqlSafe(user.ToLowerInvariant()), DataCommand.MakeSqlSafe(password), _tablePrefix)); long count = cmd.ReadAsLong() ?? 0; return(count > 0); }
//--- Methods --- public override bool CheckUserPassword(string user, string password) { DataCommand cmd = _catalog.NewQuery(string.Format("SELECT count(*) FROM {2}users WHERE name='{0}' AND pass=md5('{1}') LIMIT 1", DataCommand.MakeSqlSafe(user), DataCommand.MakeSqlSafe(password), _prefix)); long count = cmd.ReadAsLong() ?? 0; if (count > 0) { return(true); } return(false); }
public override bool CheckUserPassword(string user, string password) { DataCommand cmd = _catalog.NewQuery(string.Format("SELECT COUNT(*) FROM openIDToUser LEFT JOIN users ON openIDToUser.userID = users.userID WHERE ((users.internal = 'Y' AND openIDToUser.openID = CONCAT('{0}', '{2}') AND users.password = MD5(CONCAT('{1}', 'WL758ek0', salt))) OR (users.internal = 'N' AND openIDToUser.openID = '{0}' AND users.password = MD5('{1}'))) AND users.active = 'Y' LIMIT 1", DataCommand.MakeSqlSafe(user.ToLowerInvariant()), DataCommand.MakeSqlSafe(password), DataCommand.MakeSqlSafe(_domain))); long count = cmd.ReadAsLong() ?? 0; if (count > 0) { return(true); } return(false); }