mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-06-19 08:35:18 +00:00
Add public note to advanced user information
This commit is contained in:
@ -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']));
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user