File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
src/LdcUserProfile/Extensions/ZfcUser
tests/LdcUserProfileTest/Extensions/ZfcUser Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,10 @@ public function save($entity)
9090 $ userobj = $ this ->getUserService ()->getUserMapper ()->findById ($ entity ->zfcuser ->getId ());
9191 $ this ->transferChangesToExistingEntity ($ entity ->zfcuser , $ userobj );
9292
93+ // Stash the new entity back in the original's place so that later
94+ // extensions can use it in Doctrine associations safely
95+ $ entity ->zfcuser = $ userobj ;
96+
9397 return $ this ->getUserService ()->getUserMapper ()->update ($ userobj );
9498 }
9599
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ public function testSaveProxiesToUserMapper()
6767 $ this ->extension ->setUserService ($ mockUserService );
6868
6969 $ this ->assertEquals ('boolean ' , $ this ->extension ->save ($ arg ));
70+ $ this ->assertSame ($ mockUserEntity , $ arg ->zfcuser );
7071 }
7172
7273 public function testSaveWillHashTheUsersPasswordInZfcUserOneOneZeroAndBelow ()
You can’t perform that action at this time.
0 commit comments