Skip to content

Closes #15 #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
CppProperties.json

#ignore application
GetIntoCPPAgain.exe
*.exe

# User-specific files
*.rsuser
Expand Down
Binary file modified GetIntoCPPAgain.exe
Binary file not shown.
1 change: 1 addition & 0 deletions src/CSVParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ namespace csv
_HEADER_TYPE &Row::get_item_position(std::string_view _header)
{
std::vector<std::string>::const_iterator it;
m_item_pos = 0;

for (it = m_data.begin(); it != m_data.end(); it++)
{
Expand Down
1 change: 0 additions & 1 deletion src/login.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ bool User::m_user_request(){
std::getline(std::cin, *mptr_password);
std::cout<<std::endl;
for(csv::_HEADER_TYPE i = 0; i < mptr_csv_parser->size(); i++){
std::string_view test = mptr_csv_parser->getRow(i)["USER"];
if(mptr_csv_parser->getRow(i)["USER"] == *mptr_username){
if(mptr_csv_parser->getRow(i)["PASSWORD"] == *mptr_password){
log("Login successful\n");
Expand Down
2 changes: 1 addition & 1 deletion src/login.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class User { //holds the user and is responsible for login, logout and activity log -> gets automatically deleted with logout
private:
std::string m_database {"Data/Data.csv"};
std::string m_database {"D:/Simon/Documents/Visual Studio 2017/Projects/GetIntoCPPagain/Data/Data.csv"};
csv::CSVParser *mptr_csv_parser; //stores one csv parser for all instances
bool m_login_flag; //flag to indicate wheather user is logged in or not
bool m_user_request(); //deals with authentification of the user
Expand Down