38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
![]() |
#include <iostream>
|
||
|
#include <vector>
|
||
|
#include "user.h"
|
||
|
|
||
|
User::User(){
|
||
|
name = "";
|
||
|
password = "";
|
||
|
phone_number = "";
|
||
|
fax_number = "";
|
||
|
postal_address = "";
|
||
|
is_admin = false;
|
||
|
}
|
||
|
|
||
|
User::User(string n, string pass, string phone, string fax, string postal, bool admin){
|
||
|
name = n;
|
||
|
password = pass;
|
||
|
phone_number = phone;
|
||
|
fax_number = fax;
|
||
|
postal_address = postal;
|
||
|
is_admin = admin;
|
||
|
}
|
||
|
|
||
|
string User::getName() {return name;}
|
||
|
string User::getPassword() {return password;}
|
||
|
string User::getPhoneNumber() {return phone_number;}
|
||
|
string User::getFaxNumber() {return fax_number;}
|
||
|
string User::getPostalAddress() {return postal_address;}
|
||
|
bool User::confirmAdmin() {return is_admin;}
|
||
|
bool User::checkLogin() {return is_logged_in;}
|
||
|
vector<string> User::getGroups(){return groups;}
|
||
|
vector<string> User::getMessages(){return messages;}
|
||
|
|
||
|
void User::setName(string new_name) {name = new_name;}
|
||
|
void User::setPassword(string new_password) {password = new_password;}
|
||
|
void User::setPhone(string new_phone) {phone_number = new_phone;}
|
||
|
void User::setFax(string new_fax) {fax_number = new_fax;}
|
||
|
void User::setPostal(string new_postal) {postal_address = new_postal;}
|