public static function findByStaticEncodedLogin($nb_customer, string $key)
    {
        $retval = null;

        if (is_numeric($nb_customer_id = nb_getMixedValue($nb_customer, NABU_CUSTOMER_FIELD_ID)) &&
            strlen($key) > 0
        ) {
            $retval = CNabuUser::buildObjectFromSQL(
                'select * '
                . 'from nb_user u, nb_customer c '
               . 'where u.nb_customer_id=c.nb_customer_id '
                 . 'and c.nb_customer_id=%cust_id$d '
                 . "and md5(concat('%pref\$s', u.nb_user_login, '%suff\$s'))='%key\$s'",
                 array(
                     'pref' => self::PASS_PREF,
                     'suff' => self::PASS_SUFF,
                     'cust_id' => $nb_customer_id,
                     'key' => $key
                 )
            );
            if ($nb_customer instanceof CNabuCustomer && $retval !== null) {
                $retval->setCustomer($nb_customer);
            }
        }

        return $retval;
    }