From 967aee5a63fec43c0568abc7b0a5522c3d810580 Mon Sep 17 00:00:00 2001 From: Paul Borgermans Date: Fri, 12 Aug 2016 15:08:13 +0200 Subject: [PATCH] Fix EZP-26168: User profile edits break change password and forgot password functionality --- kernel/classes/datatypes/ezuser/ezusertype.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/classes/datatypes/ezuser/ezusertype.php b/kernel/classes/datatypes/ezuser/ezusertype.php index f39b1598bb6..335c52f2835 100644 --- a/kernel/classes/datatypes/ezuser/ezusertype.php +++ b/kernel/classes/datatypes/ezuser/ezusertype.php @@ -275,6 +275,10 @@ function onPublish( $contentObjectAttribute, $contentObject, $publishedNodes ) { $user = $this->updateUserDraft( $user, $serializedDraft ); } + // clear the serialized draft, otherwise it will override the new password hashes + // from a change or forgot password action upon a new profile/user object versions + $contentObjectAttribute->setAttribute('data_text', ''); + $contentObjectAttribute->storeData(); $user->store(); $contentObjectAttribute->setContent( $user );