-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserManager.h
More file actions
40 lines (32 loc) · 817 Bytes
/
Copy pathUserManager.h
File metadata and controls
40 lines (32 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef USERMANAGER_H
#define USERMANAGER_H
#include <iostream>
#include <vector>
#include <windows.h>
#include <fstream>
#include <sstream>
#include "TransactionsManager.h"
#include "User.h"
#include "UsersFile.h"
#include "AuxiliaryMethods.h"
using namespace std;
class UserManager {
int loggedInUserId;
vector <User> users;
UsersFile usersFile;
User setNewUserData();
bool isLoginExist(string login);
int getNewUserId();
public:
UserManager(string usersFilename) : usersFile(usersFilename) {
loggedInUserId = 0;
users = usersFile.loadUsersDataFromXmlFile();
};
void userRegistration();
void userLogging();
void changeLoggedInUserPassword();
int getLoggedInUserId();
int userLogout();
bool isUserLoggedIn();
};
#endif // USERMANAGER_H