Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-29296

UserService loadByEmail returns empty array from cache

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • Customer request, 2.2.0-beta1
    • 2.1.0
    • None
    • None

    Description

      Steps to reproduce:

      1. Use UserService::loadByEmail method with non-registered e-mail address, e.g. test@ez.no.
      2. Create the new user using PHP API with e-mail address mentioned in step 1.
      3. Use UserService::loadByEmail method with that e-mail address.

      Result:
      UserService::loadByEmail returns empty array from cache.

      Expected result:
      UserService::loadByEmail returns valid User instance.

      More information:
      When UserService::loadByEmail is called for the very first time with the non-registered email address the cache entry with empty array (returned from: https://github.com/ezsystems/ezpublish-kernel/blob/7.1/eZ/Publish/Core/Persistence/Legacy/User/Handler.php#L145) will be saved (https://github.com/ezsystems/ezpublish-kernel/blob/7.1/eZ/Publish/Core/Persistence/Cache/UserHandler.php#L92) and won't be invalidated after creation the user account with that e-mail address.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kamil.madejski@ibexa.co Kamil Madejski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: