LM-Commons / LmcUser

A generic user registration and authentication module for Laminas. Supports Laminas\Db and Doctrine2. (Formerly ZfcUser)
BSD 3-Clause "New" or "Revised" License
15 stars 16 forks source link

Fix suggested #49 #51

Closed vrkansagara closed 3 months ago

vrkansagara commented 6 months ago
      if (isset($data['user_id'])) {
        $data = $this->mapField('user_id', 'id', $data);
      }

https://github.com/LM-Commons/LmcUser/blob/341a0bd09542474c88c798e121f7ed74a74559cd/src/Mapper/UserHydrator.php#L64

49

visto9259 commented 6 months ago

As a I mentioned in the code review, the change should be made in the mapField() function as this is where the warning is raised. And making the change in the mapField() function will cover all cases where a fromKey is not found in the array.