method addUser documentation in bbn\Appui\Chat

Adds 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) && ($name1 = $this->user->getName()) && ($name2 = $this->user->getName($id_user)) && $this->db->insertUpdate( 'bbn_chats_users', [ 'id_chat' => $id_chat, 'id_user' => $id_user, 'entrance' => X::microtime(), 'admin' => 0, 'active' => 1 ] ) ) { $this->_set_state_hash($id_chat); return $this->_add_bot_message( $id_chat, [ $this->user->getId() => X::_('You added') . " $name2", $id_user => "$name1 " . X::_('added you'), $name1 . ' ' . X::_('added') . ' ' . $name2 ] ); } return false; }

Adds 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.