When a user tries to reset their password via a one time login URL, the following issues are thrown

Notice: Undefined property: stdClass::$original in apachesolr_user_update() (line 529 of /sites/all/modules/apachesolr/apachesolr.module).
Notice: Trying to get property of non-object in apachesolr_user_update() (line 529 of /sites/all/modules/apachesolr/apachesolr.module).

CommentFileSizeAuthor
#8 1423130-8.patch907 bytespwolanin
#5 1423130-5.patch876 bytespwolanin
#3 1423130-3.patch879 bytespwolanin

Comments

nick_vh’s picture

Great find. We should probaby unit test this functionality to make sure we prevent this from ever happening again.

nick_vh’s picture

Status: Active » Needs work
pwolanin’s picture

Status: Needs work » Needs review
StatusFileSize
new879 bytes

Status: Needs review » Needs work

The last submitted patch, 1423130-3.patch, failed testing.

pwolanin’s picture

Status: Needs work » Needs review
StatusFileSize
new876 bytes
rickmanelius’s picture

Awesome! I'll put in my queue to test if someone doesn't beat me to it (I'll get a reply by later tonight).

rickmanelius’s picture

Status: Needs review » Needs work

The patch fixes the second error, but I still get the first:
Notice: Undefined property: stdClass::$original in apachesolr_user_update() (line 529 of /sites/all/modules/apachesolr/apachesolr.module).

Is there a way to test and/or add $original in earlier or change the order of the testing?
(isset($account->name) && is_object($account->original) && $account->name != $account->original->name)

is_object($account->original) tests if it's an object, but it's also trying to access $account->original->name in the same line. It seems like we'd have to run a nested if statement.

pwolanin’s picture

Status: Needs work » Needs review
StatusFileSize
new907 bytes

adds 2 issets

rickmanelius’s picture

Works! Thanks :)

nick_vh’s picture

Version: 7.x-1.0-beta15 » 6.x-3.x-dev
Status: Needs review » Patch (to be ported)

Committed to 7.x

nick_vh’s picture

Status: Patch (to be ported) » Fixed

Committed to 6.x-3.x (only the comment line fix). The rest was not relevant

nick_vh’s picture

Status: Fixed » Closed (fixed)