src/bbn/appui/chat.php
public function is_admin($id_chat): ?bool
  {
    if ( $this->check() && ($chat = $this->info($id_chat)) && !$chat['blocked'] ){
      return (bool)$this->db->count('bbn_chats_users', [
        'id_chat' => $id_chat,
        'id_user' => $this->user->get_id(),
        'admin' => 1
      ]);
    }
    return null;
  }
public function is_admin($id_chat): ?bool
  {
    if ( $this->check() && ($chat = $this->info($id_chat)) && !$chat['blocked'] ){
      return (bool)$this->db->count('bbn_chats_users', [
        'id_chat' => $id_chat,
        'id_user' => $this->user->get_id(),
        'admin' => 1
      ]);
    }
    return null;
  }
public function is_admin ( $ id_chat ) : ? bool { if ( $ this -> check ( ) && ( $ chat = $ this -> info ( $ id_chat ) ) && ! $ chat [ 'blocked' ] ) { return ( bool ) $ this -> db -> count ( 'bbn_chats_users' , [ 'id_chat' => $ id_chat , 'id_user' => $ this -> user -> get_id ( ) , 'admin' => 1 ] ) ; } return null ; }
Checks whether the current user is an admin of the given chat or not.

@param $id_chat
@return bool|null
Checks whether the current user is an admin of the given chat or not .