mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-12-25 13:08:58 +00:00
Add public note to advanced user information
This commit is contained in:
parent
fe10052629
commit
d8bb0570b1
@ -196,6 +196,7 @@ class userController
|
||||
|
||||
$data['friend_list_public'] = $user->is_friendListPublic();
|
||||
$data['personnalWebsite'] = $user->has_personnalWebsite() ? $user->get_personnalWebsite() : "";
|
||||
$data['publicNote'] = $user->has_publicNote() ? $user->get_publicNote() : "";
|
||||
$data['noCommentOnHisPage'] = $user->is_disallowComments();
|
||||
$data['allowPostFromFriendOnHisPage'] = $user->is_allowPostFromFriends();
|
||||
$data['account_creation_time'] = $user->get_creation_time();
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user