Need help with a component

Dominik L Posted in Component Development 10 months ago

Hello!

I need help with a component I wrote, but I cannot publish it here because it is similar to an already available premium component.

The problem with the premium component is that it’s not working for me and I want to change it.

The component I’m talking about is the remember login component.

But the premium version which is already available, uses a method which is not working for me, especially for my user on mobile devices.

I rewrote the code, but it’s not working.

Can someone help please?

Replies
Sangro Ulsaw jwiiwq Replied 10 months ago

Can you explain more this problem? MyPaymentPlus

German Dominik L Replied 10 months ago

I am using this code since yesterday and not getting logged out :)

Indonesian Arsalan Shah Replied 10 months ago

Date().getTime() will change daily :) and your users will logout

Indonesian Arsalan Shah Replied 10 months ago

Please avoid sharing the paid codes its not allowed here, I have modified your code below.

German Dominik L Replied 10 months ago

In the paid remember login component is a fingerprint.php file, which contains the FingerprintJS Library and some code to create a cookie based on the fingerprint.

I just deleted the fingerprint and rewrote the cookie code to create a cookie with a unique visitor ID.

code removed by moderator

Ossn.RegisterStartupFunction(function() {
  $(document).ready(function() {
    ...
    ...
    ...
    var result = getCookie('rl_bfp');
    if (!result) {
      result = generateVisitorId();
      setCookie('rl_bfp', result, 365);
    }
  });

  function generateVisitorId() {
    // Generate a unique visitor ID
    var timestamp = new Date().getTime();
    var visitorId = 'visitor-' + timestamp;
    return visitorId;
  }
  ...
  ...
  ...
});

After that I deleted my browsers cookies and re-logged-in and I got a cookie with the visitor ID.

enter image description here

gb Peter Lane Replied 10 months ago

I would be interested in what you have done, could you show me please?

German Dominik L Replied 10 months ago

ignore it, i already found my own solution which seems to work