Parse user entry into GeneralSettings object.

This commit is contained in:
Pierre
2018-04-16 18:09:14 +02:00
parent bb752d6fb1
commit 5ab89ec6d8
3 changed files with 95 additions and 4 deletions

View File

@ -10,14 +10,15 @@ class GeneralSettings {
//Private fields
private $id;
private $email;
private $firstname;
private $lastname;
private $firstName;
private $lastName;
private $publicPage;
private $openPage;
private $allowComments;
private $allowPostsFriends;
private $allowComunicMails;
private $friendsListPublic;
private $virtualDirectory;
private $personnalWebsite;
//Set and get user ID
@ -127,6 +128,19 @@ class GeneralSettings {
return $this->virtualDirectory != null ? $this->virtualDirectory : "null";
}
//Set and get the personnal website of the user
public function set_personnalWebsite(string $personnalWebsite){
$this->personnalWebsite = $personnalWebsite == "" ? null : $personnalWebsite;
}
public function has_personnalWebsite() : bool {
return $this->personnalWebsite != null;
}
public function get_personnalWebsite() : string {
return $this->personnalWebsite != null ? $this->personnalWebsite : "null";
}
/**
* Check wether is object is valid or not
*