method removeUser documentation in bbn\Appui\Chat
Removes the given user to the given chat (if the current user is admin of this chat).
function(string $id_chat, string $id_user)
{
if ($this->isAdmin($id_chat)
&& bbn\Str::isUid($id_user)
&& ($name1 = $this->user->getName())
&& ($name2 = $this->user->getName($id_user))
&& $this->db->update(
'bbn_chats_users', ['active' => 0], [
'id_chat' => $id_chat,
'id_user' => $id_user
]
)
) {
$this->_set_state_hash($id_chat);
return $this->_add_bot_message(
$id_chat, [
$this->user->getId() => X::_('You remove') . " $name2",
$name1 . ' ' . X::_('removed') . ' ' . $name2
]
);
}
return false;
}
Removes the given user to the given chat (if the current user is admin of this chat). BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2023
BBN Solutions