• Resolved ketr64

    (@ketr64)


    Hi Tom,

    First of all, thanks a ton for your plugin. It seems to be doing exactly what I want. But I have some pending issues.
    I am trying to make it work. Here is where I am today:
    – the db test works fine and show me my record with all fields
    – in the settings section, I have the following error on email, first and last names, role. User and password fields are OK. Here is the error:
    “Notice: Undefined index: required in /var/www/wordpress/wp-content/plugins/external-login/views/form_elements/text_field.php on line 18”

    Also, when I try to login, I have the following error message:
    “Error: The indicated user could not be found.” and “Notice: Trying to get property ‘ID’ of non-object in /var/www/wordpress/wp-content/plugins/external-login/login/authenticate.php on line 41” as well as “Notice: Undefined property: WP_Error::$ID in /var/www/wordpress/wp-includes/class-wp-user.php on line 171”

    Do you think you can help me?

    Thanks

    Rene

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author tbenyon

    (@tbenyon)

    Hey @ketr64,

    “Notice: Undefined index: required in /var/www/wordpress/wp-content/plugins/external-login/views/form_elements/text_field.php on line 18”

    This is just a “notice” it’s not an error as such. It’s basically because I have set true to form items that are required but not set anything for ones that are not. PHP warns you that you’ve not set anything. I will make a change for this in the future to get rid of the notification but it won’t break the functionality.

    Also, when I try to login, I have the following error message:
    “Error: The indicated user could not be found.” and “Notice: Trying to get property ‘ID’ of non-object in /var/www/wordpress/wp-content/plugins/external-login/login/authenticate.php on line 41” as well as “Notice: Undefined property: WP_Error::$ID in /var/www/wordpress/wp-includes/class-wp-user.php on line 171”

    I can add some additional safeguarding to protect this from happening but it seems strange that you’re getting this error on that line of code. I’m curious to know if you’re using a particularly old version of WordPress? Do you know your version?
    Could you also advise which version of PHP you are running? I’m just surprised you’re getting this error as it is expected that that line will not always find a user and no one else has ever reported an error getting returned – it normally just indicates to the plugin that it should be creating a new user rather than updating the one that’s already been setup in the WordPress database.

    These PHP and WordPress versions should help me replicate this issue locally.

    Thanks Rene,

    Tom

    Thread Starter ketr64

    (@ketr64)

    Thanks Tom for your reply. Here are my site parameters:

    – External Login: version: 1.10.0
    – Core version: 5.5.3
    – php_version: 7.4.3 64bit
    – Database: server_version: 8.0.20, client_version: mysqlnd 7.4.3

    Best
    Rene

    I get the same error. My version of php is 7.3.24

    Plugin Author tbenyon

    (@tbenyon)

    Thanks @torrespri and @ketr64 for keeping me posted. Will update you at the weekend.

    ??

    Plugin Author tbenyon

    (@tbenyon)

    Hey @torrespri and @ketr64,

    Just an update to let you know that although I could not replicate this error, I have made a change to the code so that this error cannot happen. The change is released as version 1.11.0.

    Could you please let me know if this has resolved your issues?

    Thanks for your support,

    Tom Benyon ??

    The error keeps showing
    Notice: Undefined index: in /var/www/vhosts/wordpress/wp-content/plugins/external-login/login/db.php on line 98

    Notice: Undefined property: WP_Error :: $ ID in /var/www/vhosts/wordpress/wp-includes/class-wp-user.php on line 171

    Recoverable fatal error: Object of class WP_User could not be converted to string in /var/www/vhosts/wordpress/wp-includes/pomo/entry.php on line 91

    Plugin Author tbenyon

    (@tbenyon)

    Hey @torrespri,

    Sounds like this is a new error. Presumably this one is called because we’ve got passed the last one.

    I’m still confused why when I’m trying to use the same versions you specified that I’m not seeing the same errors in the php error log.

    There’s over 1000 sites using the plugin successfully so I’m intrigued to know how this issue has only cropped up now by two users.

    It feels like we must be using a different version of PHP. Very strange.

    I could fix this error again without being able to replicate it but we might be on a continuous cycle.

    I’m going to do more research this evening to see what else could be the difference between our setups.

    Thanks for keeping me posted and I’ll endeavour to do the same ??

    Thread Starter ketr64

    (@ketr64)

    Hi,
    I will reinstall the new plugin version in a couple of hours, test it and keep you posted.
    We really need to make it work Tom. I need it !! ??
    Rene

    Thread Starter ketr64

    (@ketr64)

    Hi Tom,
    It seems to work now for me ?? when I select MD5.
    I have a problem though when I select ‘sha512’, I have an invalid user/pwd error.
    I need to investigate to understand why. On my side I encrypt the pwd in Python with hashlib.sha512(). I probably have a coding error when generating the encrypted pwd.
    Thanks a ton man. You are saving my life and a few days of work if I wouldn’t have had your plugin!!
    Rene

    Plugin Author tbenyon

    (@tbenyon)

    Hey Rene (@ketr64),

    Glad to hear yours has progressed!

    I may make a testing system in the admin area in the future so users can test they are using the correct hash algorithm.

    If your hashing system is using something more customised than what the settings page caters for there is a hook that you can use to write custom. More details on this in the FAQ for the plugin but feel free to come back here if you have any questions.

    Thanks,

    Tom ??

    SIDE NOTE
    I’m sure you have everything in hand but using just sha512 to hash your passwords is not the most secure but you may well be putting in additional steps. Bcrypt is a good way to go as it handles custom salts for each password, slow hashing and future proofing by via rounds. More detail in the Security Notes section on the main pluguin page ??

    Plugin Author tbenyon

    (@tbenyon)

    This thread has gone stale so I’m marking as resolved.

    Please feel free to come back with questions if you have any ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Can’t login and Undefined Index’ is closed to new replies.