diff --git a/DataBaseLMS/interfacedatabaselms.cpp b/DataBaseLMS/interfacedatabaselms.cpp index 944ad9a..650a55b 100644 --- a/DataBaseLMS/interfacedatabaselms.cpp +++ b/DataBaseLMS/interfacedatabaselms.cpp @@ -51,7 +51,7 @@ bool InterfaceDataBaseLMS::AuthorizationInstructor(QString login, QString passwo if(int id = selectInstructorID(login, password)) { - if(isArchivedInstructor(id)) + if(isArchivedInstructor(id) || isLoggedInInstructor(id)) { transactionEnd(); return false; @@ -179,7 +179,7 @@ bool InterfaceDataBaseLMS::AuthorizationTrainee(QString login, QString password, if(int id = selectTraineeID(login, password)) { - if(isArchivedTrainee(id)) + if(isArchivedTrainee(id) || isLoggedInTrainee(id)) { transactionEnd(); return false; diff --git a/ServerLMS/Systems/processingsystem.cpp b/ServerLMS/Systems/processingsystem.cpp index 599866e..bbbd562 100644 --- a/ServerLMS/Systems/processingsystem.cpp +++ b/ServerLMS/Systems/processingsystem.cpp @@ -74,6 +74,10 @@ void ProcessingSystem::processingClientAutorization(ClientHandler *client, Clien arrayAnswer = dataParser->ClientAnswer()->authorization(true, instructorName, traineeName, "trainee", clientAutorization.Login); } + else + {//Никто не авторизовался + arrayAnswer = dataParser->ClientAnswer()->authorization(false, "", "", "", ""); + } } else {//Никто не авторизовался