Jump to content
Craig

ProcessLoginPersistent

Recommended Posts

@Craig - thanks for your work on this. If a cronjob is run it throws this error:

PHP Notice: Undefined index: HTTP_USER_AGENT

Would you mind disabling this module when called via the CLI, eg. PHP_SAPI !== 'cli'

Thanks!

Share this post


Link to post
Share on other sites

Also a bug:

$this->destroyLogins($user);

needs to be:

$this->destroyLogins($this->wire('user'));

 

Share this post


Link to post
Share on other sites

Actually, I think it needs to be:

$this->destroyLogins($this->wire('user')->id);

because I am getting this error:

HP Notice: Object of class ProcessWire\User could not be converted to int in /var/www/html/site/assets/cache/FileCompiler/site/modules/LoginPersist/LoginPersist.module:400

Share this post


Link to post
Share on other sites

Hey @adrian! I'm pretty sure that those issues were already fixed. Could you check that you've got 2.1.0 installed?

  • Like 2

Share this post


Link to post
Share on other sites
4 minutes ago, teppo said:

Hey @adrian! I'm pretty sure that those issues were already fixed. Could you check that you've got 2.1.0 installed?

Thanks @teppo - I actually noticed there was a new version the other day and used the PW Upgrades module to update, but for some reason it's not actually updating the module (I just tried again) - I assumed it had worked. 

Anyway, I manually updated to 2.1.0 and you're correct of course - it seems like they have been fixed.

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, adrian said:

used the PW Upgrades module to update, but for some reason it's not actually updating the module (I just tried again) - I assumed it had worked. 

Hi! Glad you've got it updated (in the end)... is the problem you had with PW Upgrades, or something I've done (or not done!) with the LoginPersist module?

Share this post


Link to post
Share on other sites
1 minute ago, Craig said:

is the problem you had with PW Upgrades, or something I've done (or not done!) with the LoginPersist module?

Honestly not sure - maybe the permissions on that file got messed up? I expect it was something locally specific.

Share this post


Link to post
Share on other sites

Ah OK! Thanks. All's well that ends well :) 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Tyssen
      I have a client who is reporting that in the last couple of days they can no longer login to their site with their normal browser (Chrome). Using another browser or an incognito window works.
      I've tried logging into the site using the same login details in my usual browser (Firefox) and have had no problems.
      The site is a membership site and today other members are reporting the same problem.
      The site is running 3.0.148 and has the session handler DB and login throttle modules installed. It was recently upgraded to 3.x from 2.x. But no changes have been made to the site between the time when they were able to login OK and when the problem started happening.
    • By codevark
      The Minimal Site works fine, but if I try to login as admin, I have no idea what the credentials are.
      I did not do the "install" process myself. The OVA came with everything set up, but there's no mention of the PW admin credentials being set to some initial value.
      Wondering if anyone else has tried the Bitnami OVA and if there's a simple answer.
      --Pete
    • By franciccio-ITALIANO
      Hi, I need to provide a quite complex user registration form: description, subdescription, drop-down lists etc. 
      Through this registration, users will be able to access and comment.
      If someone responds to their comments, I would like a NOTIFICATION to appear when accessing their panel.
      My social interaction project is just that, it seems simple, I don't need more.
      Now I am undecided whether to use buddypress, elgg, or a native processwire system.
      What do you recommend? 
      If you recommend processwire, which modules should I install?
      Do they work or is processwire too immature for that?
      Translated with www.DeepL.com/Translator (free version)
    • By abdulqayyum
      Dear processwire community,
      i have a problem in loginRegister module, i could not add custom field in login and register page.
      i read from plugin documentation. they are saying.
      " By default, the email and password fields are required for both forms. You may want to add more fields. To do this, you’ll need to add fields to your “user” template. You can add fields to your user template in the admin by going to “Setup > Templates > Show system templates > user”.

      but i could not find similar scenario like “Setup > Templates > Show system templates > user”
      i can see just "Setup > Templates" not seeing "Show system templates > user" in my admin panel.

      Please help me in this case that how i can add custom field in these two page.
      Regards AbdulQayyum

    • By Anton
      Hi there,
      I'm working with Processwire 3. Before summer I had issues to load to my backend. I finally managed to connect thanks to this : 
      $admin = wire('users')->get('admin');
      $admin->setOutputFormatting(false);
      $admin->set('pass', 'yo12345ZZ')
      $admin->save('pass');
      But later, the problem evolved: when I logged in to the site, the login page redirected me to the home. I didn't find any information about it on the web.
      But recently, the redirection has changed, now it is the login page that reloads when you connect. 
      I don't know where to start to fix this. It looks like sorcery.
      Thank you for all the help you can give me.
       
×
×
  • Create New...