Add public note to advanced user information

This commit is contained in:
Pierre
2018-05-05 11:17:48 +02:00
parent fe10052629
commit d8bb0570b1
3 changed files with 16 additions and 0 deletions

View File

@ -422,6 +422,7 @@ class UserComponent {
$user->set_friendListPublic($entry['liste_amis_publique'] == 1);
$user->set_personnalWebsite($entry['site_web']);
$user->set_publicNote($entry['public_note']);
$user->set_disallowComments($entry['bloquecommentaire'] == 1);
$user->set_allowPostFromFriends($entry['autoriser_post_amis'] == 1);
$user->set_creation_time(strtotime($entry['date_creation']));

View File

@ -13,6 +13,7 @@ class AdvancedUser extends User {
//Private fields
private $friendListPublic;
private $personnalWebsite;
private $publicNote;
private $disallowComments;
private $allowPostFromFriends;
private $creation_time;
@ -42,6 +43,19 @@ class AdvancedUser extends User {
return $this->personnalWebsite != null ? $this->personnalWebsite : "null";
}
//Get and set the account public note
public function set_publicNote(string $publicNote){
$this->publicNote = $publicNote == "" ? null : $publicNote;
}
public function has_publicNote() : bool {
return $this->publicNote != null;
}
public function get_publicNote() : string {
return $this->publicNote != null ? $this->publicNote : "null";
}
//Get and set comment status on user page
public function set_disallowComments(bool $disallowComments){
$this->disallowComments = $disallowComments;