Skip to content

Commit

Permalink
update loginProcessing method
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidne committed Jul 10, 2018
1 parent 31ff261 commit 727b38c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ServerApplication/StrProcessing.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,25 +163,20 @@ void StrProcessing::loginProcessing()

bool existPass = false, existUser = false;

int i;
for (i = 0; i < sizeAccount && (!existUser || !existPass); i++)
{
for (int i = 0; i < sizeAccount; i++)
if (username == username_pass[i].username)
{
if (password == username_pass[i].password)
{
existUser = true;
existPass = true;
ID_Account = i - 1;
break;
}
}
}

if (existUser && existPass)
{
char *sendStr = "1";
send(Client, sendStr, strlen(sendStr), 0);
ID_Account = i - 1;
file.Load_ReciveMail(ID_Account);
file.Load_SendMail(ID_Account);
}
Expand Down

0 comments on commit 727b38c

Please sign in to comment.