Helper/Data.php
public function getContactId($email, $websiteId)
    {
        if (! $this->isEnabled($websiteId)) {
            return false;
        }

        $contactFromTable = $this->getContactByEmail($email, $websiteId);
        if ($contactId = $contactFromTable->getContactId()) {
            return $contactId;
        }

        $contact = $this->getContact($email, $websiteId, $contactFromTable);
        if ($contact && isset($contact->id)) {
            return $contact->id;
        }

        return false;
    }
public function getContactId($email, $websiteId)
    {
        if (! $this->isEnabled($websiteId)) {
            return false;
        }

        $contactFromTable = $this->getContactByEmail($email, $websiteId);
        if ($contactId = $contactFromTable->getContactId()) {
            return $contactId;
        }

        $contact = $this->getContact($email, $websiteId, $contactFromTable);
        if ($contact && isset($contact->id)) {
            return $contact->id;
        }

        return false;
    }
public function getContactId ( $ email , $ websiteId ) { if ( ! $ this -> isEnabled ( $ websiteId ) ) { return false ; } $ contactFromTable = $ this -> getContactByEmail ( $ email , $ websiteId ) ; if ( $ contactId = $ contactFromTable -> getContactId ( ) ) { return $ contactId ; } $ contact = $ this -> getContact ( $ email , $ websiteId , $ contactFromTable ) ; if ( $ contact && isset ( $ contact -> id ) ) { return $ contact -> id ; } return false ; }
Get the contact id for the customer based on website id.

@param string $email
@param int $websiteId

@return bool|string
Get the contact id for the customer based on website id .