code: public function existLogin(string $login): int
      {
          return (int) $this->connection->select(self::COLUMN_ID)
              ->from($this->tableIdentity)
              ->where(['login' => $login])
              ->fetchSingle();
      }
docs: Exist login.
  
  @param string $login
  @return int